Closed jeremiedbb closed 1 year ago
thanks for your PR!
If we want to allow this, then we probably also need --files
and --exclude
arguments
I'll add a commit
cool, added (mirroring what I already do, and have tested, in nbQA)
@jeremiedbb version 0.13.0 should have this feature, please do let me know if it doesn't work for you!
Thanks @MarcoGorelli, I just tested it and it works as expected !
Currently the command requires to give the list of file paths to check. This PR proposes to allow giving the paths of directories and recursively search for cython files. It allows to do
cython-lint .
like we're used to withflake8
orblack
.It assumes that it should only look for
.pyx
,.pxd
and.pxi
files. I don't know if it's safe enough to assume that.An alternative I considered was to allow for a glob pattern instead of a directory. The advantage is that it delegates the responsibilty of the suffix to the user (but requires 1 pattern for each suffix). The disadvantage is that it can be a pain for windows users.