Repository navigation
style: apply ruff format and import sorting - #72
Merged
Merged
Conversation
Format all Python files with ruff 0.17.3 (Black style) and sort their imports with ruff's isort rules, with the settings of #38 (target-version py313, force-sort-within-sections, known-first-party pubgrade and tests, without the submodule external/). Formatting and import order only. Closes #71 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Reviewer's GuideImplementationApply Ruff formatting and import sorting to the application modules without changing their behavior.
ConfigurationSort the imports in the package setup script.
TestsApply Ruff formatting and import sorting to test modules and their shared mock data.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #72 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 1192 1192
=========================================
Hits 1192 1192 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
uniqueg
marked this pull request as ready for review
November 7, 2026 05:25
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#71 style: apply ruff format and import sorting · 3 of 3 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Format all Python files with ruff format (Black style). | ✅ Met | The Python changes shown are formatting-only transformations. |
| 2 | Sort imports with ruff's isort rules and the specified settings, excluding external/. | ✅ Met | Imports are reordered within their sections; the linked description and PR summary state that the specified settings were used and external/ was left untouched. |
| 3 | Change only formatting and import order; keep code unchanged otherwise and tests passing as before. | ✅ Met | The apparent string changes are equivalent adjacent-literal concatenations, and the PR reports 470 passing tests with 100% coverage. |
Sourcery assessment
Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Formats all Python files with ruff 0.17.3 (Black style) and sorts their imports with ruff's isort rules. The settings are the ones #38 adds:
target-version = "py313",force-sort-within-sections,known-first-party = ["pubgrade", "tests"], and the submoduleexternal/excluded. Only formatting and import order change. This PR comes first so that #38 can list its squash commit in.git-blame-ignore-revs.Closes #71
Verification
ruff format --diff(0.17.3, same settings): no changes left.ruff check --select Ipasses.dev: all statements other than imports are identical. The only exception is four test-module docstrings, which lost a trailing space. The imported names are also the same. Two of them (from foca.models.config import ConfigandMongoConfig, intests/pubgrade/test_server.pyandtests/pubgrade/endpoints/test_repositories.py) are now merged into one line. Thetry/exceptimport intest_server.pykeeps its place.external/is untouched.Review
Full review: the adversarial and quality reviewers checked that the diff is formatting only.
Declined review findings
None.
Open questions
None.
🤖 Generated with Claude Code
Summary by Sourcery
Enhancements: