-
-
Notifications
You must be signed in to change notification settings - Fork 30
[NOT READY FOR REVIEW] Update pre-commit to all files and Mypy setup #247
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR standardizes code formatting by updating the pre-commit setup to include the Taplo TOML formatter and reformatting all files, enhances type safety by extending the mypy configuration with the pydantic plugin, and adds a dummy function to enforce lint/pre-commit checks. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Thanks for adding the Here's a preview of the changelog: This release does not introduce any new features or bug fixes. It focuses solely on internal code quality improvements. Changes:
These changes aim to improve maintainability and ensure better development practices moving forward. |
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 @Ckk3 - I've reviewed your changes - here's some feedback:
- Remove the
test_without_pre_commit
dummy function before merging, as it’s only intended to trigger lint failures. - Add a mypy type‐checking step to your CI workflows (e.g. GitHub Actions) to ensure the new mypy.ini is actually enforced.
- Make sure the pydantic mypy plugin is added to the project’s dev dependencies so mypy can load it successfully.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟡 Testing: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -883,7 +883,8 @@ def interface(self, model: Type[BaseModelType]) -> Callable[[Type[object]], Any] | |||
): | |||
raise InterfaceModelNotPolymorphic(model) | |||
return self.type(model, make_interface=True) | |||
|
|||
def test_without_pre_commit(): |
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.
issue (testing): Unexpected test method inside mapper – remove or relocate
That test method on the mapper class lacks a self parameter and will break the API—remove it or move it to the proper test suite.
CodSpeed Performance ReportMerging #247 will not alter performanceComparing Summary
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #247 +/- ##
==========================================
- Coverage 89.94% 88.94% -1.01%
==========================================
Files 17 17
Lines 1939 1953 +14
Branches 141 141
==========================================
- Hits 1744 1737 -7
- Misses 123 141 +18
- Partials 72 75 +3 🚀 New features to boost your workflow:
|
…nvalid rules in lint
Description
This PR introduces a mypy configuration similar to the one used in the main Strawberry project, and integrates a type-checking step into the CI workflows to ensure type safety is enforced consistently across the codebase.
Additionally, I ran
pre-commit
on all files, as many had not been formatted previously and did not follow the project's linting architecture. This helps standardize the codebase and reduce noise in future diffs.Types of Changes
Issues Fixed or Closed by This PR
Checklist
Summary by Sourcery
Enforce consistent code formatting and enhance type safety by updating pre-commit hooks and Mypy setup, with a test to validate lint enforcement
Enhancements:
Tests: