bp/resqpy

Enable a progressively larger subset of ruff rules for logical issues

Open

#924 建立於 2026年6月19日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Python (18 fork)auto 404
good first issue

倉庫指標

Star
 (66 star)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南