[pre-commit.ci] pre-commit autoupdate (#2959)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: c59bba8fb259db0fec2bbb77ad8ba51ea7341b56 → 39d9ac5938dadb73df0564a45f163e25ff9fa6e2](https://github.com/astral-sh/ruff-pre-commit/compare/c59bba8fb259db0fec2bbb77ad8ba51ea7341b56...39d9ac5938dadb73df0564a45f163e25ff9fa6e2)
- [github.com/pre-commit/mirrors-mypy: d2823d321df3af8f878f7ee3414dc94d037145b9 → 41e691678310dfd3833f7ab4e180ddb014310356](https://github.com/pre-commit/mirrors-mypy/compare/d2823d321df3af8f878f7ee3414dc94d037145b9...41e691678310dfd3833f7ab4e180ddb014310356)
- [github.com/codespell-project/codespell: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a → 57b21406f092110c18776e39b0bda50d37c945c8](https://github.com/codespell-project/codespell/compare/2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a...57b21406f092110c18776e39b0bda50d37c945c8)

* chore: fix lint errors from new ruff rules

Ruff 0.16 enables BLE, TRY, and N999 by default. Use local noqa
excludes for the blind-except catches, ignore TRY002 and N999 in tests,
and drop the pylint equivalents.

Assisted-by: ClaudeCode:claude-opus-5

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <henryfs@princeton.edu>
This commit is contained in:
pre-commit-ci[bot]
2026-08-11 17:42:16 -04:00
committed by GitHub
co-authored by pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Henry Schreiner
parent 1928c1bfa5
commit 10c055d89c
6 changed files with 10 additions and 8 deletions
+3 -1
View File
@@ -166,6 +166,7 @@ messages_control.disable = [
"wrong-import-position",
"unused-argument", # Handled by Ruff
"import-outside-toplevel", # Handled by Ruff
"broad-exception-caught", # Handled by Ruff
"broad-exception-raised", # Could be improved eventually
"consider-using-in", # MyPy can't narrow "in"
]
@@ -217,6 +218,7 @@ ignore = [
"PT007", # Lists of tuples in Pytest
"PYI025", # Set as AbstractSet
"PTH123", # open -> Path.open
"TRY002", # Create your own exception
]
flake8-unused-arguments.ignore-variadic-names = true
flake8-tidy-imports.ban-relative-imports = "all"
@@ -234,7 +236,7 @@ future-annotations = true
[tool.ruff.lint.per-file-ignores]
"unit_test/*" = ["PLC1901", "TID252"]
"test/*" = ["TID252"]
"test/*" = ["TID252", "N999"]
"bin/*" = ["TID251"]
"cibuildwheel/resources/install_certifi.py" = ["PTH"]