问题
I'm trying to find a Python coding style enforcer (tool, not person!). Any recommendations?
回答1:
I only know pylint, but it is not an automatic code formatter, rather a marking tool.
回答2:
Don't forget PEP8, both the PEP8 style guide (http://www.python.org/dev/peps/pep-0008/) and the tool
Not a lint like tool, but keeps your style in line with the main python community.
yapf (https://pypi.python.org/pypi/yapf) is super cool, reformats your code to be pep8 compliant. Very handy
回答3:
pyflakes is like pylint
but faster.
来源:https://stackoverflow.com/questions/3892656/anyone-have-a-favorite-python-coding-style-enforcer