[code-quality] pylint for cython?

Mike Müller mmueller at python-academy.de
Fri Sep 12 19:25:19 CEST 2014


Am 12.09.14 17:52, schrieb Skip Montanaro:
> 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.

You should try pure Python mode:
http://docs.cython.org/src/tutorial/pure.html

This allows you to keep your code valid, pure python and put all the Cython
related stuff into decorators. Works pretty well. There might be few places
were it does not work; for example, wrapping C libraries. But you could put
these parts in small, extra files and could still check most of your code.

I would be interested in your experiences with this. So let me know how it
works if you try.

Mike

> 
> A few Google and PyPi searches failed to reveal anything. Is there something
> out there?
> 
> Thanks,
> 
> Skip
> 
> 
> 
> _______________________________________________
> code-quality mailing list
> code-quality at python.org
> https://mail.python.org/mailman/listinfo/code-quality
> 



More information about the code-quality mailing list