Skip to content

Reduce B-grade complexity hotspots in src/nncg to all-A #43

Description

@tschm

Subcategory: Code complexity — 9 → 10

Context: Surfaced by the quality scorecard in #42. No C-or-worse blocks exist (avg complexity A, 2.97), but three B-grade hotspots and two low-A-band modules keep this off a perfect score.

Files / blocks to change:

  • src/nncg/inner.py:112_nystrom (CC 10, B)
  • src/nncg/solver.py:343ActiveSetSolver._run (CC 9, B)
  • src/nncg/inner.py:213Exact class / Exact.solve:247 (CC 7 / 6, B)
  • Maintainability index: src/nncg/solver.py 51.84, src/nncg/inner.py 53.84 (low end of A)

Done when: every block in uvx radon cc src -s ranks A (CC ≤ 5) and uvx radon mi src -s reports all modules ≥ 65 MI.

Evidence:
```
M 343:4 ActiveSetSolver._run - B (9)
F 112:0 _nystrom - B (10)
src/nncg/solver.py - A (51.84)
```

Ref: #42

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions