Skip to content

Fix flake8 E501: Line too long in server.py line 1053#24

Merged
trsdn merged 3 commits into
mainfrom
copilot/fix-22
Sep 17, 2025
Merged

Fix flake8 E501: Line too long in server.py line 1053#24
trsdn merged 3 commits into
mainfrom
copilot/fix-22

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 17, 2025

Resolves a flake8 linting error where line 1053 in markitdown_mcp/server.py exceeded the 100-character limit, causing CI/CD pipeline failures.

Problem

The error message string for missing dependencies was 120 characters long, violating the project's flake8 configuration:

safe_message = "Missing dependency - install markitdown with appropriate extras (e.g., markitdown[pdf])"

This caused the following linting error:

markitdown_mcp/server.py:1053:101: E501 line too long (120 > 100 characters)

Solution

Split the long string across multiple lines using Python's implicit string concatenation with parentheses:

safe_message = (
    "Missing dependency - install markitdown with appropriate "
    "extras (e.g., markitdown[pdf])"
)

Changes

  • Line 1053: Split into 4 lines with proper indentation
  • Maximum line length: Reduced from 120 to 79 characters
  • Functionality: Preserved - string concatenation produces identical result
  • Code style: Follows Python best practices for long strings

Verification

  • ✅ flake8 E501 error eliminated
  • ✅ No new linting issues introduced
  • ✅ String content remains identical (87 characters total)
  • ✅ Python syntax validation passed
  • ✅ Existing error handling functionality preserved

The fix is minimal and surgical, affecting only the problematic line while maintaining all existing functionality and code quality standards.

Fixes #22.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Split long error message string at line 1053
- Ensure line length stays within 100 character limit
- Fixes flake8 linting error

Co-authored-by: trsdn <24534196+trsdn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix flake8 E501: Line too long in server.py line 1053 Fix flake8 E501: Line too long in server.py line 1053 Sep 17, 2025
Copilot AI requested a review from trsdn September 17, 2025 16:43
@trsdn trsdn marked this pull request as ready for review September 17, 2025 17:20
@trsdn trsdn merged commit 00c2635 into main Sep 17, 2025
69 of 82 checks passed
@trsdn trsdn deleted the copilot/fix-22 branch September 17, 2025 17:20
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 17, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix flake8 E501: Line too long in server.py line 1053

2 participants