docs/manual: PEP8 coding style for Python scripts
PATCH 1/1 docs/manual: PEP8 coding style for Python scripts
The advantages of using a pre-existing coding style instead of creating our own are:
- documenting on the manual takes a single sentence;
- there are automatic tools to help during development/review.
So document that PEP8 recommendation should be followed.
---
Here is the sentence I didn't add:
The use of https://pypi.python.org/pypi/pycodestyle[Python style guide checker] is recommended before submitting new scripts.
I mentioned in a thread the tool pep8/pycodestyle
From https://pypi.python.org/pypi/pycodestyle :
"This package used to be called pep8 but was renamed to pycodestyle to reduce confusion"
Old url: https://pypi.python.org/pypi/pep8
Also Thomas DS mentioned the tool flake8 that seems to me to group:
pycodestyle + pyflakes + mccabe
http://flake8.pycqa.org/en/latest/
--- docs/manual/writing-rules.txt | 5 +++++ 1 file changed, 5 insertions(+)
docs/manual/writing-rules.txt +5 -0
@@ -143,3 +143,8 @@ http://www.methods.co.nz/asciidoc/[asciidoc] format. For further details about the http://www.methods.co.nz/asciidoc/[asciidoc] syntax, refer to http://www.methods.co.nz/asciidoc/userguide.html[]. + +=== Support scripts + +Some scripts in the +support/+ directory are written in Python and should follow +the https://www.python.org/dev/peps/pep-0008/[PEP8 Style Guide for Python Code].
Signature · 1 line
2.11.0
PATCH 1/1 docs/manual: PEP8 coding style for Python scripts
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Ricardo" == Ricardo Martincoski <[email protected]> writes:
The advantages of using a pre-existing coding style instead of creating our own are:
- documenting on the manual takes a single sentence;
- there are automatic tools to help during development/review.So document that PEP8 recommendation should be followed.
Seems sensible to me. Committed, thanks.
Quoted 16 lines
Cc Arnout Vandecappelle <[email protected]>Cc Maxime Hadjinlian <[email protected]>Cc Samuel Martin <[email protected]>Cc Thomas De Schampheleire <[email protected]>Signed-off-by Ricardo Martincoski <[email protected]>---
Here is the sentence I didn't add:
The use of https://pypi.python.org/pypi/pycodestyle[Python style guide checker] is recommended before submitting new scripts.I mentioned in a thread the tool pep8/pycodestyle
From https://pypi.python.org/pypi/pycodestyle :
"This package used to be called pep8 but was renamed to pycodestyle to reduce confusion"
Old url: https://pypi.python.org/pypi/pep8
Quoted 3 lines
Also Thomas DS mentioned the tool flake8 that seems to me to group:
pycodestyle + pyflakes + mccabe
http://flake8.pycqa.org/en/latest/
Ok. We don't get new python scripts that often, so it probably isn't a huge deal.
Signature · 1 line
Bye, Peter Korsgaard