Anyone have a favorite Python coding style enforcer?

送分小仙女□ 提交于 2019-12-23 06:05:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!