Skip to content

MAINT: Modernization sweep: idioms that postdate their reasons #898

Description

@mmcky

Problem

Accumulated idioms whose motivating constraints have expired; none affects behavior:

  • The codebase splits almost 50/50 between two spellings of the same thing: 55 @njit vs 57 @jit(nopython=True. The keyword has been the default (and a no-op) since numba 0.59. Normalize to one spelling. Coordinate with the coverage-measurement fix in this milestone first.coveragerc currently keys its exclusions on these decorator spellings, so changing them independently would silently move which code is measured.
  • _ivp.py:46: Py2-style super(IVP, self).__init__ (moot if the solve_ivp migration lands first — sequence accordingly).
  • util/compat.py: the NumpyVersion < "1.28.0" branch is dead once the install-metadata issue raises the NumPy floor to ≥2 — the module collapses to copy_if_needed = None (keep the seam; shrink the body).
  • 16 ambiguous single-letter l variables (E741) in numerical code; 18 lambda assignments (E731); printf-style formatting → f-strings.
  • quad.py:140 — the comment "TODO: I don't know what this does": archaeology against Miranda–Fackler's CompEcon (the module's cited source), then either explain or link.

Proposed change

Batch by kind, one small PR each, after the lint-gate ratchet in this milestone lands (its baseline makes these diffs enforceable). Several batches are self-contained enough for newcomers once the gate exists.

Acceptance criteria

  • nopython=True occurrences at 0 (excluding signatures that genuinely require it); one decorator spelling throughout, cache=True/parallel=True preserved
  • E741/E731 counts at 0 or baselined with a comment
  • quad.py:140 TODO resolved to an explanation or a reference

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

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions