fix: clean up dead code and naming violations (25 fixes)#1203
Open
decko wants to merge 1 commit into
Open
Conversation
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMechanical Ruff cleanup across app, tasks, and tests: unused arguments/variables are marked or removed, one test function is renamed to snake_case, a few imports gain noqa annotations for intentional side effects or naming, and minor test utilities are simplified to avoid unused keys and variables. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Member
Author
|
/retest |
5 similar comments
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
ARG001 (5): prefix unused signal handler args with _ F401 (1): noqa for Django side-effect import (signals) F841 (2): remove unused variable assignments RUF059 (3): replace unused unpacked vars with _ B007+PERF102 (1): switch .items() to .values() for unused key N806 (2): noqa for Django get_user_model(), lowercase test var N802 (1): rename test_user_permissions_without_orgId to snake_case I001+F401+F811 (8): auto-fixed unsorted/unused imports Reduces total ruff violations from 37 → 12. Assisted-by: Claude Code <noreply@anthropic.com>
6cb9482 to
b198a4f
Compare
Member
Author
|
/retest |
4 similar comments
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
Member
Author
|
/retest |
This file contains hidden or 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
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
Fix 25 ruff violations: dead code cleanup, unused arguments, and naming conventions. Net zero line change — all mechanical renames and removals.
__.items()to.values()when key is unusedget_user_model(), lowercase test vartest_user_permissions_without_orgIdto snake_caseReduces total ruff violations from 37 → 12.
Remaining 12 violations (deferred)
All are either per-file-ignored complexity rules or scattered violations that need individual judgment:
PLR0911,PLR0912,PLR0915,C901(already per-file-ignored)B006,B905,SIM108,SIM115,SIM117,TRY004Test plan
make lintshows only 12 pre-existing violationsmake format-checkpasses🤖 Generated with Claude Code
Summary by Sourcery
Clean up lint violations by removing unused variables/imports, marking intentional side-effect imports, and aligning names with project conventions across app code and tests.
Enhancements:
Chores: