Commit 8b84823
committed
π Template: switch to Ruff hook from repo for pre-commit
Use the Ruff pre-commit hook from the astral repository, instead of a `local` repo
relying on Hatch. Hatch uses Ruff under the hood anyways, and we don't want contributors
to have to install Hatch. Moreover, using a locally installed Hatch instance has shown
to not always be robust or deterministic in the past, especially in CI.
Some of the `ignore` rules might not make sense at this point, since Ruff does not
`select` them by default. But we keep them and their rationale for now, since we may
introduce their classifier in the future.
`ruff check --fix` can change code semantics/structure (e.g., remove unused imports,
reorder/simplify, apply pyupgrade-like fixes). These edits often need reformatting
afterwards. Hence, we switch the order of the pre-commit to run the linter first.1 parent ac840bd commit 8b84823
File tree
3 files changed
+11
-13
lines changed- template
- tests
3 files changed
+11
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
0 commit comments