-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add base-class inheritance detection to flake8-django rules #9151
Merged
Conversation
This file contains 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
charliermarsh
force-pushed
the
charlie/django
branch
from
December 15, 2023 17:55
1ccfc51
to
3d30f12
Compare
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
DJ008 | 14 | 14 | 0 | 0 | 0 |
DJ012 | 5 | 5 | 0 | 0 | 0 |
Linter (preview)
ℹ️ ecosystem check detected linter changes. (+19 -0 violations, +0 -0 fixes in 41 projects)
zulip/zulip (+19 -0 violations, +0 -0 fixes)
ruff check --no-cache --exit-zero --preview --select ALL
+ zerver/models.py:1895:7: DJ008 Model does not define `__str__` method + zerver/models.py:2171:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `__str__` method should come before custom method + zerver/models.py:2382:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `Meta` class should come before custom method + zerver/models.py:2677:7: DJ008 Model does not define `__str__` method + zerver/models.py:3207:7: DJ008 Model does not define `__str__` method + zerver/models.py:3216:7: DJ008 Model does not define `__str__` method + zerver/models.py:3279:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `Meta` class should come before custom method + zerver/models.py:3382:7: DJ008 Model does not define `__str__` method + zerver/models.py:3393:7: DJ008 Model does not define `__str__` method + zerver/models.py:3503:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `__str__` method should come before custom method + zerver/models.py:3508:7: DJ008 Model does not define `__str__` method + zerver/models.py:3808:7: DJ008 Model does not define `__str__` method + zerver/models.py:3829:7: DJ008 Model does not define `__str__` method + zerver/models.py:4456:7: DJ008 Model does not define `__str__` method + zerver/models.py:4943:5: DJ012 Order of model's inner classes, methods, and fields does not follow the Django Style Guide: `Meta` class should come before `__str__` method + zilencer/models.py:191:7: DJ008 Model does not define `__str__` method + zilencer/models.py:210:7: DJ008 Model does not define `__str__` method + zilencer/models.py:235:7: DJ008 Model does not define `__str__` method + zilencer/models.py:254:7: DJ008 Model does not define `__str__` method
Changes by rule (2 rules affected)
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
DJ008 | 14 | 14 | 0 | 0 | 0 |
DJ012 | 5 | 5 | 0 | 0 | 0 |
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
As elsewhere, this only applies to classes defined within the same file.
Closes #9150.