Open bdice opened 1 year ago
Ideally users would be able to ignore import
and cimport
statements separately -- in the cases I'm considering, I'd like to detect unused cimport
statements but ignore unused import
statements.
good idea - interested in submitting a pr?
It seems like cython-lint might need a way to ignore violations raised by cython-lint itself (as opposed to pycodestyle) which seems like it could be a lot of scope. That would require naming a code for existing violations, unless you want to do something like add a flag for every violation (e.g. --ignore-unused-imports
, --ignore-unused-cimports
). What do you think is the best course of action?
either sounds good!
just fyi for now I'd expect that # no-cython-lint
would work, but a cli argument to turn off this globally sounds useful
In flake8, users can ignore
F401
to avoid warning about unused imports. I triedcython-lint --ignore F401
but it seems to do nothing. From the source of cython-lint, it doesn't seem like there is a way to disable this check right now. https://github.com/MarcoGorelli/cython-lint/blob/0afd5462e02db4a1f10442ca3111bb22c757ca7b/cython_lint/cython_lint.py#L744