Skip to content

Fix ruff lint violations and update config#146

Merged
DanSheps merged 1 commit into
DanSheps:mainfrom
jsenecal:fix/ruff-lint-violations
Mar 26, 2026
Merged

Fix ruff lint violations and update config#146
DanSheps merged 1 commit into
DanSheps:mainfrom
jsenecal:fix/ruff-lint-violations

Conversation

@jsenecal
Copy link
Copy Markdown
Collaborator

@jsenecal jsenecal commented Mar 24, 2026

Summary

  • Exclude migrations from ruff linting (Django-generated files with false positive RUF012)
  • Ignore RUF012 globally (mutable class attributes are standard Django convention)
  • Fix import sorting (I001) and __all__ ordering (RUF022) across all modules
  • Replace date.today() / datetime.now() with timezone-aware variants (DTZ005/DTZ011)
  • Flatten nested if statements (SIM102)
  • Fix line length in graphql types (E501)
  • Use .values() instead of .items() where only values are needed (PERF102)
  • Run black for consistency

Test plan

  • CI passes ruff and black checks
  • All existing tests still pass

- Exclude migrations from ruff (Django-generated, false positives)
- Ignore RUF012 globally (mutable class attrs are standard Django)
- Fix import sorting (I001) and __all__ ordering (RUF022)
- Replace date.today()/datetime.now() with timezone-aware variants
- Flatten nested if statements (SIM102)
- Fix line length violation in graphql types (E501)
- Use .values() instead of .items() where applicable (PERF102)
- Run black formatter for consistency
@DanSheps DanSheps merged commit ba5216b into DanSheps:main Mar 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants