-
-
Notifications
You must be signed in to change notification settings - Fork 576
chore(deps): update ruff to 0.12.0 #3926
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR manually updates Ruff from v0.11.x to v0.12.x by bumping both the pre-commit hook and Poetry dev dependency, extends the lint configuration, and aligns code with the new Ruff rules. Class diagram for updated import structure in strawberry.cli.initclassDiagram
class app
class codegen
class export_schema
class locate_definition
class schema_codegen
class server
class upgrade
class run
app <.. run : used by
codegen <.. run : used by
export_schema <.. run : used by
locate_definition <.. run : used by
schema_codegen <.. run : used by
server <.. run : used by
upgrade <.. run : used by
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bellini666 - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Updates Ruff linter from v0.11.13 to v0.12.0 across development dependencies and pre-commit hooks to improve syntax error detection and f-string formatting compatibility with Python 3.13.4.
- Updated Ruff version to ^0.12.0 in
pyproject.toml
dev dependencies - Modified
.pre-commit-config.yaml
to use Ruff v0.12.0 for pre-commit hooks - Changes impact both linting and formatting configurations in the codebase
- Update accommodates new f-string formatting rules for Python 3.13.4 compatibility
2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic reviewed 2 files and found no issues. Review PR in cubic.dev.
Hi, thanks for contributing to Strawberry 🍓! We noticed that this PR is missing a So as soon as this PR is merged, a release will be made 🚀. Here's an example of Release type: patch
Description of the changes, ideally with some examples, if adding a new feature. Release type can be one of patch, minor or major. We use semver, so make sure to pick the appropriate type. If in doubt feel free to ask :) Here's the tweet text:
|
Apollo Federation Subgraph Compatibility Results
Learn more: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3926 +/- ##
=======================================
Coverage 94.76% 94.76%
=======================================
Files 520 520
Lines 33951 33951
Branches 1759 1759
=======================================
Hits 32172 32172
Misses 1497 1497
Partials 282 282 🚀 New features to boost your workflow:
|
CodSpeed Performance ReportMerging #3926 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍓 tho it looks like the failing test need an _T
to T
update as well
Just updated this, will check what is breaking now |
5781d2a
to
8eaf26a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @bellini666 - I've reviewed your changes - here's some feedback:
- The PR title and summary mention updating Ruff to 0.12.0 but the changes actually bump to 0.12.3; please align the version references accordingly.
- Please double-check that the new ignore codes (UP045, PLC0415) and the exclusion of tests/python_312 don’t unintentionally suppress important lint warnings in supported environments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The PR title and summary mention updating Ruff to 0.12.0 but the changes actually bump to 0.12.3; please align the version references accordingly.
- Please double-check that the new ignore codes (UP045, PLC0415) and the exclusion of tests/python_312 don’t unintentionally suppress important lint warnings in supported environments.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR extends the previously reviewed Ruff 0.12.0 update with comprehensive changes across the codebase to ensure compatibility and improve code quality. Key changes include:
-
Enhanced type safety improvements:
- Added explicit type validation for GraphQL operation parameters
- Improved handling of lazy types in NameConverter and ConnectionExtension
- Added type assertions for GraphQL response data
-
Documentation improvements:
- Added clear documentation for InputMutationExtension
- Enhanced Django integration docs with async context guidance
- Restructured extension documentation for better clarity
-
Test suite enhancements:
- Added comprehensive tests for lazy loading in Relay connections
- Improved validation tests for GraphQL operations
- Added performance benchmarks for large list handling
PR Description Notes:
- The reference to PR #3924 indicates this is a manual resolution of a previously failing update
Confidence score: 4 /5
- This PR is generally safe to merge as it primarily consists of defensive improvements and documentation updates
- The score of 4 reflects strong testing and documentation but warrants attention due to the scope of changes
- Key files needing attention:
- docs/general/why.md (appears to be accidentally deleted)
- strawberry/http/async_base_view.py and sync_base_view.py (significant validation changes)
- strawberry/types/arguments.py (performance optimization changes)
33 files reviewed, no comments
Edit PR Review Bot Settings | Greptile
This was conflicting and failing, so I decided to update it manually
Summary by Sourcery
Update ruff linter to version 0.12.3 and adjust code and configuration to satisfy new lint rules.
Enhancements:
Build:
Tests:
Chores: