Skip to content

Fix ruff formatting in markitdown_mcp/server.py on main branch#23

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

Fix ruff formatting in markitdown_mcp/server.py on main branch#23
trsdn merged 3 commits into
mainfrom
copilot/fix-21

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 17, 2025

The file markitdown_mcp/server.py had formatting issues that were causing all PRs to fail Code Quality checks, regardless of their content. The issue was caused by unnecessarily split string concatenations that ruff wanted to merge for better readability.

Problem

String literals were split across multiple concatenated strings where they should have been single strings:

# Before (incorrect):
"Base64 encoded file content " "(alternative to file_path)"
"Original filename when using " "file_content"
"Convert all supported files in a " "directory to Markdown"
"Path to the output directory " "(optional)"

# After (correct):
"Base64 encoded file content (alternative to file_path)"
"Original filename when using file_content"
"Convert all supported files in a directory to Markdown"
"Path to the output directory (optional)"

Solution

Applied ruff format to automatically fix the string concatenation formatting. The changes are minimal and surgical - only 4 lines were modified with no functional changes to the code.

Impact

  • ✅ All formatting checks now pass (ruff format --check .)
  • ✅ All lint checks pass (ruff check .)
  • ✅ All existing tests continue to pass (19/19 MCP protocol tests)
  • ✅ Future PRs will no longer fail CI Code Quality checks due to this formatting issue

This was a critical blocking issue preventing any PR from passing CI, even those that didn't touch the affected file.

Fixes #21.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 17, 2025

@trsdn 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

- Fix string concatenation formatting issues
- Merge unnecessarily split strings on lines 779, 784, 800, and 810
- Resolves CI Code Quality failures blocking all PRs

Co-authored-by: trsdn <24534196+trsdn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix ruff formatting in markitdown_mcp/server.py on main branch Fix ruff formatting in markitdown_mcp/server.py on main branch Sep 17, 2025
Copilot AI requested a review from trsdn September 17, 2025 16:42
@trsdn trsdn marked this pull request as ready for review September 17, 2025 17:19
@trsdn trsdn merged commit 78db604 into main Sep 17, 2025
73 of 82 checks passed
@trsdn trsdn deleted the copilot/fix-21 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

@github-actions
Copy link
Copy Markdown
Contributor

🔍 CI Quality Gates Summary

Overall Status: ✅ All Passed

Check Status Details Action Required
🎨 Format ✅ Passed ruff format check None
🔧 Lint ✅ Passed ruff linting None
📝 Types ✅ Passed mypy type checking None
🧪 Tests ✅ Passed Unit tests None
📊 Coverage 80.5% Minimum: 80% None
🔌 MCP ✅ Valid Protocol compliance None
🔒 Security ✅ Clean Dependency audit None

🔗 Quick Links

🛠️ Quick Fix Commands

# Fix most issues automatically
ruff format .
ruff check . --fix

# Run tests locally
pytest tests/unit/ --cov=markitdown_mcp

# Check types
mypy markitdown_mcp

Last updated: 2025-09-17 17:27:09 UTC

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 ruff formatting in markitdown_mcp/server.py on main branch

2 participants