pydistcheck
pydistcheck copied to clipboard
[ci] enforce 'isort' checks in linting
What change would you like to see?
Running the following from the root of the repo
make lint
Should fail (return a non-0 exit code) when the project's imports don't match the structure isort preferred.
How would implementing this improve pydistcheck?
As of this writing, make format reformats imports with isort.
https://github.com/jameslamb/pydistcheck/blob/cb6247f64a46b6699b1940f2ad04061dd5d3a6e9/Makefile#L32-L34
But doesn't prevent code that isort would prefer to modify from making it onto main.
https://github.com/jameslamb/pydistcheck/blob/cb6247f64a46b6699b1940f2ad04061dd5d3a6e9/Makefile#L40-L50
That makes it possible for future runs of make format to produce changes that are unrelated to whatever you're working on, which is distracting and a little confusing if you're not familiar with that.
Notes
Related to #180.