MarcoGorelli / cython-lint

Lint Cython files
MIT License
69 stars 11 forks source link

Ignore multiple lines #17

Closed RMeli closed 1 year ago

RMeli commented 1 year ago

It would be useful to have, in addition to # no-cython-lint to ignore a single line, to have something like

# cython-lint off
pass
# cython-lint on

to ignore multiple lines of code.

MarcoGorelli commented 1 year ago

Hi @RMeli - what's the use-case for this?

MarcoGorelli commented 1 year ago

gonna say no for now, not really keen on adding complexity, but thanks anyway for your request

RMeli commented 1 year ago

Hi @MarcoGorelli, the use case I had in mind is to turn off linting for multiple lines of code, where specific formatting is required/preferred (long mathematical expressions, arrays, ...). Some tools allow this (especially formatting tools, such as black), but I totally understand keeping the complexity low.