Pin static-checking versions and add pre-commit Action#813
Pin static-checking versions and add pre-commit Action#813
Conversation
|
@jsignell, I've just discovered your dask/dask#7370 (I can see that the |
|
I imagine I just picked the latest version of isort when I opened that PR on dask, so there is no special magic to that version :) |
jsignell
left a comment
There was a problem hiding this comment.
This looks pretty good to me. My main suggestion is that in dask/dask, there is a github action that runs pre-commit. That is a pretty nice way to capture the linting config in one place.
Thanks for checking this out, @jsignell! Apologies - I'm not very familiar with GitHub Actions, and wanted to double-check if implementing your suggestion could be done as part of this PR, or if it requires maintainer access to the repository? |
| combine_as_imports=True | ||
| line_length=88 | ||
| profile=black | ||
| skip= |
There was a problem hiding this comment.
With the new profile=black option, skipping docs/source/conf.py is no longer necessary.
It can be done as part of this PR or as a follow-on if you prefer. Shouldn't require any special access. This is how the dask pre-commit action is set up https://github.com/dask/dask/blob/main/.github/workflows/pre-commit.yml |
Understood - thank you very much, @jsignell! |
ci/environment-3.6.yaml
Outdated
| - isort==5.8.0 | ||
| - msgpack-python ==0.6.2 | ||
| - multipledispatch | ||
| - mypy |
There was a problem hiding this comment.
For reproducible/predictable CI runs, the mypy versions in these files should probably be pinned as well. Please, let me know if you've got any objections.
|
@jameslamb has brought up a very good point in #822 (comment) about considering pinning the static checker versions in Line 28 in f5e5bb4 Also, I've just noticed that mypy is missing from setup.py.
@jrbourbeau, when you get a chance, could you confirm if you've got any objections, with respect to pinning optional-dependency versions and adding |
One potential disadvantage of that (i.e., pinning minimum versions for On the other hand, that's already what happens with respect to the non-testing package requirements: Line 13 in f5e5bb4 |
Updates, associated with this PR:
isortandblackcan apparently be stuck in a never-ending loop of proposing updates to the same file back and forth.blackandisort, namely a--profile=blackoption, which is available in recentisortversions (but not in4.3.21, which is why this PR proposes bumping theisortversion up to5.8.0, released on March 20th 2021). I appreciate that some previous efforts to enableisortandblackto play nicely together are present in theisortsection of setup.cfg, but it somehow feels more logical to aim to employ recent versions in addition to that, unless there exist some associated constraints (CI environment-related or otherwise).