diff --git a/README.md b/README.md index fdf28011fb..b8b975b804 100644 --- a/README.md +++ b/README.md @@ -16,3 +16,6 @@ To create an initial user account, run the command `python InvenTree/manage.py c ## Documentation For project code documentation, refer to the online [documentation](http://inventree.readthedocs.io/en/latest/) (auto-generated) + +## Coding Style +All python code should conform to the [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guide. Run the *pep_check.py* script which will compare all source (.py) files against the PEP 8 style. diff --git a/pep_check.py b/pep_check.py index 64de2a568f..71ce27db68 100644 --- a/pep_check.py +++ b/pep_check.py @@ -1,3 +1,12 @@ +""" +Checks all source files (.py) against PEP8 coding style. +The following rules are ignored: + - W293 - blank lines contain whitespace + - E501 - line too long (82 characters) + +Run this script before submitting a Pull-Request to check your code. +""" + import subprocess -subprocess.call(['pep8', '--exclude=migrations', '--ignore=EC04,W293,E501', 'InvenTree']) \ No newline at end of file +subprocess.call(['pep8', '--exclude=migrations', '--ignore=W293,E501', 'InvenTree'])