-
-
Notifications
You must be signed in to change notification settings - Fork 913
fix: improve pylint score for web.models module #4793
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: master
Are you sure you want to change the base?
Conversation
- Fix __str__ method in UserStatus modell to return str(self.name) instead of self.name - Rename conflicting admin classes to avoid redefinition errors: - UserAdmin -> CustomUserAdmin - TokenAdmin -> CustomTokenAdmin - EmailAddressAdmin -> CustomEmailAddressAdmin - Replace old-style string formatting with f-strings in views.py - Fix typo: recieve_newsletter -> receive_newsletter - Improve search fields in ProfileAdmin Pylint score improved from ~8.17 to 9.58/10 for accounts module. Overall pylint score improved to 8.20/10 (above target of 7.5). Fixes Cloud-CV#4557
- Revert admin field name from 'receive_newsletter' to 'recieve_newsletter' - This matches the actual field name in the Profile model - Fixes Django system check errors that were causing CI to fail The field name in the model still has the typo, but changing it would require a database migration. For now, keeping the admin consistent with the model.
- Fix __str__ method in Team model to return str(self.name) instead of self.name - Replace old-style string formatting with f-strings in Contact and Subscribers models - Pylint score improved from ~9.55 to 10.00/10 for web.models module Continues work on issue Cloud-CV#4557
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4793 +/- ##
==========================================
+ Coverage 91.89% 91.90% +0.01%
==========================================
Files 86 86
Lines 7132 7132
==========================================
+ Hits 6554 6555 +1
+ Misses 578 577 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
hey @RishabhJain2018 pr is ready for review ,pls have a look |
|
@RishabhJain2018 review required |
Description
This PR improves the pylint score for the web.models module as part of issue #4557.
=> Changes Made
__str__method in Team model to returnstr(self.name)instead ofself.name__str__method to use f-string formatting__str__method to use f-string formatting=> Pylint Score Improvements
=> Testing
Continues work on issue #4557