-
-
Notifications
You must be signed in to change notification settings - Fork 309
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
Enable more rules for ruff #562
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #562 +/- ##
==========================================
+ Coverage 89.92% 90.18% +0.26%
==========================================
Files 31 32 +1
Lines 1032 1080 +48
Branches 104 158 +54
==========================================
+ Hits 928 974 +46
- Misses 69 71 +2
Partials 35 35 ☔ View full report in Codecov by Sentry. |
Good job 👍 |
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.
new breath in old codebase!
|
||
class ConstanceConfig(AppConfig): | ||
name = 'constance' | ||
verbose_name = _('Constance') | ||
default_auto_field = 'django.db.models.AutoField' | ||
|
||
def ready(self): | ||
from . import checks | ||
checks.register(check_fieldsets, 'constance') |
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.
There is no need to register check here. They are registered automatically in decorator while loading module. Only import is required here.
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.
I just reused practice from django.
I'm not too fond of import which is not clearly understandable.
import this
The Zen of Python, by Tim Peters
...
Explicit is better than implicit.
@sergei-iurchenko @Natim thank you for the review! 🦸♂️ |
|
||
from django.core import checks | ||
from django.core.checks import CheckMessage | ||
from django.utils.translation import gettext_lazy as _ | ||
|
||
|
||
@checks.register('constance') |
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.
🙏
No description provided.