5 Commits

Author SHA1 Message Date
eb1a25abfb CHORE: Upgrade ruff to ~0.12.8 (#2734)
Subjectively, there have been more issues recently with contributor PRs
being rejected by ruff. This could possibly be caused by them using a
different ruff version (presumably: more recent). This PR upgrades ruff
to the latest version to hopefully reduce these issues.

The only change needed to make this ruff version pass was to disable
UP045. This rule requires changing code like:

x: Optional[int]

into

x: int | None

in 220 places. Personally, I don't think it's crucial. Moreover, ruff
won't fix this automically, except with --unsafe-fixes (note that Python
3.9 needs a __future__ import for this, so that could be the reason). My
preference is thus just to disable the rule, but LMK if you disagree.
2025-08-14 18:03:38 +02:00
bbb112841b MNT Update ruff to v0.9.2 (#2343)
We use ruff for linting. The version is fixed because otherwise, we
formatting changes would creep into random PRs. Thus far, the version
was ~0.6.1 but that's already quite old by now, thus moving to ~v0.9.2.

The ruff changes themselves are all about:

1. Other line breaking logic for asserts with messages
2. More aggressive string normalizaton

Comment

Making these changes is always a bit annoying since existing PRs might
need to be updated, but there is never a really good time to do it.
2025-01-24 11:28:38 +01:00
850eeb5c3a FIX Pre-commit version in config (#2034) 2024-08-26 11:50:02 +02:00
8fcb1951a5 MAINT: Update ruff version to ~0.6.1 (#1965)
Moving to ruff ~0.6.1. Changes:

- type comparisons now require is: str is str
- remove overridden class attribute active_adapter
- remove secondary import of fbd_cuda

Omit jupyter notebooks for now. We can think about adding that in a
separate PR.
2024-08-22 15:23:23 +02:00
47c4d9578c Add pre-commit configuration (#1467) 2024-02-19 12:11:01 +01:00