Skip to content

FIX: Review the eight F841 unused-local findings in numerical modules #883

Closed

Description

@mmcky

Problem

flake8 reports eight F841 unused-local findings across four numerical modules. Kept separate from the mechanical hygiene sweep deliberately: in numerical code an assigned-and-discarded matrix is occasionally the residue of an incomplete edit, so each site needs a human decision rather than a blanket deletion.

Location Finding
_robustlq.py:245 Q, R unpacked from instance state, never used
_robustlq.py:246 beta assigned, never used
_robustlq.py:384 Q, R unpacked, never used
_kalman.py:161 k assigned, never used
_lss.py:394 H assigned, never used
_matrix_eqn.py:275 k assigned, never used

The _robustlq.py cluster is the one to examine first: three separate sites unpack Q, R and beta and then never use them — the pattern you would expect if a computation was refactored and its inputs left behind.

Acceptance criteria

  • Each site is either removed, or kept with a comment explaining why the binding exists
  • Any site where the unused variable reveals a genuine logic gap gets its own issue
  • Suite passes with no new warnings

From the July 2026 technical-debt audit (AI-assisted; claims verified against 28d4b3b on 2026-07-25).

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions