pylint for cython?
stefan_ml at behnel.de
Fri Sep 12 18:42:15 CEST 2014
Skip Montanaro schrieb am 12.09.2014 um 17:52:
> I have slowly been converting some Python source to Cython. I'm pretty
> conservative in what changes I make, mostly sprinkling a few "cdef",
> "float" and "int" declarations around the pyx file. Still, conservative or
> not, it's enough to choke pylint. Rather than have to maintain a pure
> Python version of my code, it would be nice if pylint had a flag or if
> there was a "cylint" tool available.
If you really just do things like "cdef int x", I recommend using pure
Python syntax for it (in a .py file). That way, you can just run pylint
over it as before.
Specifically, the "@cython.locals()" decorator might be all you need, or
maybe some of the other things like "@cython.cfunc".
More information about the Python-list