bp/resqpy

Enable a progressively larger subset of ruff rules for logical issues

Open

#924 aperta il 19 giu 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Python (18 fork)auto 404
good first issue

Metriche repository

Star
 (66 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

We could enable some linting rules for things that look like real bugs. A few high signal-to-noise ones could be:

  • PLW0177 - we have a few checks with == np.nan that always evaluate to False and are thus pointless
  • B006 - mutable default args, easy to fix
  • B904 - better exception chaining
  • PLW2910 - loop var overwritten, a bit suspicious, 10 hits

Others to investigate: PLE / RSE, FLY, PIE810.

Other rules which probably make sense only after enabling ruff format, but which are probably lower-priority:

  • UP (pyupgrade), urles are largely auto-fixable (hurrah)
  • SIM (simplify) - often useful
  • RET - avoid returning None implicitly. Perhaps a longer-term goal, as lots of resqpy functions

Guida contributor