Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] docs/manual: PEP8 coding style for Python scripts
@ 2017-04-24  1:33 Ricardo Martincoski
  2017-04-27 19:39 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Martincoski @ 2017-04-24  1:33 UTC (permalink / raw)
  To: buildroot

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.

Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
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(+)

diff --git a/docs/manual/writing-rules.txt b/docs/manual/writing-rules.txt
index e2ad41ebc..3a2c8dcb3 100644
--- a/docs/manual/writing-rules.txt
+++ b/docs/manual/writing-rules.txt
@@ -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].
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-27 19:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-24  1:33 [Buildroot] [PATCH] docs/manual: PEP8 coding style for Python scripts Ricardo Martincoski
2017-04-27 19:39 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox