Is there any way to use pep8 with cython files?
pep8 does not work with operators for example.
getline(& line)
produces error:
E225 missing whitespace around operator
Now if i try to fix it and run this:
getline( & line)
produces error:
E201 whitespace after '('
By default, Pylint will enforce PEP8-suggested names.
Pycodestyle (Formerly PEP8) is the official linter tool to check the python code against the style conventions of PEP8 python. To install it: pip install pycodestyle .
In python, the most consensual writing style is defined by the PEP-8 standard, which the popular pylint package enforces. It comes with a handy metric, the Pylint score: you get a 10/10 for perfectly conforming to the standard, less it you stray from it.
pep8 warn about 8-space indent.
The neural network library Chainer has a pretty handy flake8 config for Cython:
[flake8]
filename = *.pyx,*.px*
exclude = .eggs,*.egg,build
ignore = E901,E225,E226,E227
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With