Skip to content

chore(lint): weekly black/isort/flake8 sweep - #142

Draft
ringo380 wants to merge 1 commit into
mainfrom
chore/weekly-lint-20260817
Draft

chore(lint): weekly black/isort/flake8 sweep#142
ringo380 wants to merge 1 commit into
mainfrom
chore/weekly-lint-20260817

Conversation

@ringo380

Copy link
Copy Markdown
Owner

Description

Auto-generated by the QueryGrade weekly lint routine. Ran black and isort across analyzer/ and querygrade/; no logic changes.

Diffstat: 15 files changed, 58 insertions(+), 56 deletions(-)

Type of Change

  • Refactoring (no functional changes)

Related Issues

N/A — recurring maintenance sweep.

Changes Made

  • black analyzer/ querygrade/ reformatted 12 files.
  • isort analyzer/ querygrade/ re-sorted imports in 4 files (some overlap with black).
  • No hand edits; no changes outside analyzer/ and querygrade/.

Files touched:

analyzer/management/commands/process_ml_feedback.py
analyzer/management/commands/train_ml_model.py
analyzer/migrations/0008_mlmodelartifact.py
analyzer/ml/core/hybrid_grader.py
analyzer/ml/core/training_gates.py
analyzer/ml/core/training_pipeline.py
analyzer/ml/tests/test_alert_notifier.py
analyzer/ml/tests/test_model_storage.py
analyzer/ml/tests/test_process_ml_feedback_command.py
analyzer/ml/tests/test_training_gates.py
analyzer/test_analytics.py
analyzer/test_seo.py
analyzer/urls.py
analyzer/views/ml_alert_views.py
querygrade/settings.py

Testing

  • Unit tests pass (python manage.py test)
  • Integration tests pass
  • Manual testing completed
  • ML model accuracy validated (if applicable)

Formatting-only diff — leaving verification to CI / reviewer.

Test Configuration

N/A — no runtime behavior changed.

ML Model Changes (if applicable)

N/A.

Screenshots (if applicable)

N/A.

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

Outstanding flake8 findings (manual fix required)

flake8 analyzer/ querygrade/ reported 1172 findings that black/isort cannot auto-fix. Breakdown by code:

Count Code Meaning
737 E501 line too long (> 88 chars)
329 F401 imported but unused
51 F841 local variable assigned but never used
19 F541 f-string without placeholders
14 F405 may be undefined, or defined from star imports
8 E402 module-level import not at top of file
7 F811 redefinition of unused name
5 F403 from module import * used
2 F821 undefined name

Top 10 files by finding count:

Findings File
53 analyzer/management/commands/seed_training_data.py
37 analyzer/ml/analysis/pattern_library.py
32 analyzer/ml/integration/benchmark_generator.py
30 analyzer/analyzers/wildcard_analyzer.py
30 analyzer/analyzers/groupby_analyzer.py
29 analyzer/ml/optimization/query_rewriter.py
27 analyzer/analyzers/window_function_analyzer.py
27 analyzer/analyzers/case_statement_analyzer.py
26 analyzer/analyzers/indexing_analyzer.py
25 analyzer/query_optimizer.py

The two F821 (undefined name) findings are the most worth triaging first — those are latent bugs, not style. Everything else is a cleanup backlog to burn down opportunistically.


Generated by Claude Code

Auto-generated by the QueryGrade weekly lint routine.
Tooling: black + isort across analyzer/ and querygrade/.
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