You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Toolchain:
- Bump the pinned linters that CI enforces: ruff 0.2.0 -> 0.15.8 and the
mypy pre-commit hook 1.8.0 -> 1.20.2 (aligning the package type-check with
the `mypy>=1.20` floor the test suite now requires), and switch to the
non-deprecated `ruff-check` hook id (updating the hatch lint:build script
to match).
- Enable additional mypy error codes: truthy-iterable, possibly-undefined,
redundant-self, unused-awaitable.
- Drop ruff rules removed upstream (UP038, PT004, PT005); ignore PLC0415
(traitlets relies on lazy/optional imports); relax RUF059/PLW0108/B024
for tests, matching the existing per-file test allowances.
Typing / correctness:
- parse_notifier_name / observe / unobserve: Iterable -> Collection, so the
`not names` / `All in names` checks are honest (a generator was a latent
bug) and truthy-iterable is satisfied.
- SingletonConfigurable.instance now returns Self instead of a bespoke
TypeVar (PYI019).
- _CallbackWrapper gets a __hash__ consistent with __eq__ (PLW1641).
- Use `is` instead of `==` for exact trait-type comparisons (E721).
- Correct/remove stale `type: ignore` codes and unused noqa directives
surfaced by the newer mypy.
Cleanups:
- Modernize %-formatting and str.format to f-strings (UP031/UP032), across
traitlets/, tests/, examples/ and docs/.
- Replace dict-index iteration with .items() (PLC0206), iterable unpacking
(RUF005), and lazy %-args for a logging call (G004).
- Reformat with the newer ruff-format.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TBmDBHmq8vVSGig4i37KK7
0 commit comments