Skip to content

Code Quality: Fix 1,458 MEDIUM RISK Flake8 Violations (Phase 2) #175

@mrveiss

Description

@mrveiss

Phase 2: MEDIUM RISK Violations - Need Careful Review

Parent Issue: #173
Total: 1,458 violations
Risk: LOW - But requires testing after each batch

Violations

  • 1,395 E501: Lines too long (>88 chars)
  • 62 F541: F-strings missing placeholders

Implementation Strategy

F541: F-strings (62 violations)

Can be automated with verification:

# Before: f"Hello World" 
# After: "Hello World"

Fix in batches of 20, test after each batch.

E501: Long lines (1,395 violations)

Cannot be fully automated - requires manual review:

  • Long strings: Break into multiple lines
  • URLs: Use variables or line continuation
  • Complex expressions: Refactor for readability

Fix in batches of 50-100, test after each batch.

Implementation Steps

  1. Create branch: fix/code-quality-medium-risk
  2. First: Fix all 62 F541 violations
  3. Then: Fix E501 violations in batches:
    • Backend files first (safer)
    • Test extensively
    • One commit per 50-100 fixes
  4. Create PR after each major batch

Testing Required

After each batch:

  • Backend imports test
  • Start backend server
  • Run affected functionality
  • Flake8 verification

Success Criteria

  • All 1,458 violations fixed
  • All tests passing
  • No functionality broken
  • Code committed with detailed messages

See CODE_QUALITY_VIOLATIONS.md and flake8_violations_full.txt.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions