-
Notifications
You must be signed in to change notification settings - Fork 49
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
chore: enable flake8-django (DJ) rule in ruff config #779
Merged
afuetterer
merged 1 commit into
rdmorganiser:dev-2.1.0
from
afuetterer:766-flake8-django
Nov 29, 2023
Merged
chore: enable flake8-django (DJ) rule in ruff config #779
afuetterer
merged 1 commit into
rdmorganiser:dev-2.1.0
from
afuetterer:766-flake8-django
Nov 29, 2023
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
afuetterer
commented
Oct 16, 2023
This comment was marked as resolved.
This comment was marked as resolved.
jochenklar
reviewed
Oct 16, 2023
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
afuetterer
force-pushed
the
766-flake8-django
branch
from
October 17, 2023 04:40
2724815
to
1160ee4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
afuetterer
force-pushed
the
766-flake8-django
branch
2 times, most recently
from
October 19, 2023 09:30
e97f09a
to
96bed38
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Created new questions fixtures, using: python manage.py loaddata fixtures/*
python manage.py makemigrations
python manage.py migrate
python manage.py dumpdata questions | python -m json.tool --indent 2 > questions.json |
afuetterer
force-pushed
the
766-flake8-django
branch
from
October 20, 2023 09:47
0ec41a5
to
03213a8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
MyPyDavid
approved these changes
Oct 20, 2023
This comment has been minimized.
This comment has been minimized.
jochenklar
force-pushed
the
dev-2.1.0
branch
from
November 16, 2023 13:01
d8dbae1
to
6cc0dbd
Compare
afuetterer
force-pushed
the
766-flake8-django
branch
from
November 28, 2023 06:08
03213a8
to
86f4fe4
Compare
Rebased and ready for review. |
jochenklar
approved these changes
Nov 28, 2023
Can we merge this @MyPyDavid? |
Yes please, I have approved already right |
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.
Description
This PR is an attempt to enable the flake8-django (DJ) rule in the ruff config.
The first and easiest fix was to reorder method and manager declarations to have the order the ruleset expects them
What do you think about these rules?
To me both rules make sense, but we could also ignore them.
DJ007 would mean to explicitly name all fields that are exposed through the modelform, which might be a good idea anyway in case not all of them should be exposed?
DJ001 would mean to alter the model fields (add
default=""
) to TextFields and generate new migrations. To me the rule makes sense: not to have an empty string and null possible for TextFields.But what do you think?
Related issue: #766
Types of Changes
Checklist
Tasks
null=True, blank=True
withblank=True, default=""