-
Notifications
You must be signed in to change notification settings - Fork 13
How to ensure your python code to match style guide pep8
Pep8 is a python style guide, which aims to use a uniform standard layout for python programs. This increases the readability and comparability for other developers. Please take note of the documentation for an extended description.
We suggest to use the pypi package pep8 to check your python code regarding the pep8 style guide. The installation of this package can be done inside the terminal by pip install pep8
. Afterwards you run the package on your code via pep8 Input.py
, which gives you remarks to code lines with exceptions to the pep8 style guide directly on your screen. pep8 Input.py > Output
generates an output file for the exceptions. As last step your code has to be adapted with respect to the named exceptions.
It is possible to automatically formats Python code to conform to the PEP 8 style guide. https://pypi.org/project/autopep8/