Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Commit4c034db
committed
Split tox "lint" env into three envs, all safe
It makes sense for ruff linting and ruff autoformatting to beeasily runnable individually and to have their results be shownseparately. Splitting them out in tox.ini also makes it so tox cando the other tests corresponding to those in lint.yml on CI in anenvironment that requries no custom behavior from pre-commit otherthan skipping the ruff checks.The ruff linting ("ruff") and ruff format checking ("format") toxenvironments specify ruff as a dependency and call it directlyrather than through pre-commit, invoking it in such a way that itdoes not attempt to modify any files in the working tree.Seeb059cd5 (#1868) for context. All three of these tox envs that"lint" has been split into are listed in the env_list and thus runautomatically when tox is run with no arguments, since no tox envsunexpectedly (or at all) modify files in the working tree anymore.One limitation of the current approach is that new pre-commit hooksconfigured in .pre-commit-config.yml will automatically be run aspart of the "misc" tox environment, which means that new unexpectedmutating operatons could be added if the impact on tox is notconsidered. The benefit of having it work this way is that mosthooks that are likely to be added to GitPython would not modifyfiles and would be wanted as part of "misc". But this may benefitfrom further refinement.1 parentf788418 commit4c034db
1 file changed
+18
-4
lines changedLines changed: 18 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
| 3 | + | |
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
13 |
| - | |
| 12 | + | |
| 13 | + | |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
16 | 23 |
| |
17 | 24 |
| |
18 | 25 |
| |
| |||
28 | 35 |
| |
29 | 36 |
| |
30 | 37 |
| |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + |
0 commit comments
Comments
(0)