All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC] Adopt a coding style for Python scripts
@ 2017-04-13 23:44 Ricardo Martincoski
  2017-04-14 17:14 ` Arnout Vandecappelle
  0 siblings, 1 reply; 10+ messages in thread
From: Ricardo Martincoski @ 2017-04-13 23:44 UTC (permalink / raw)
  To: buildroot

Samuel, Maxime, Thomas, All,

First of all, I don't want to start a flame war.

I would like to know what you think about moving from A to D (or C or B) below.

A) keep using the implicit coding style for Python that we use now in Buildroot;

B) adopt a pre-existing Python coding style;
   The advantages of using a pre-existing one are: documenting on the manual
   takes a single sentence; for some coding styles there are automatic checkers
   to help during development/review.
   Of course there are coding style guides others than PEP8. But I don't know
   much about them.
   Do some of you use another coding style for Python? What are its advantages?

C) adopt the recommendation PEP8 [1] as coding style;

D) adopt the recommendation PEP8 [1] as coding style and the tool pep8 [2] as
   automatic checker for coding style before submitting patches;
   It checks for a subset of the recommendation (e.g. file naming is not
   checked).

What I am *NOT* proposing:
- use Python for every script;
- adapt all current Python scripts as the first step;
- enforce, starting now, 0 warnings from pep8 [2] before merging a patch;
- use an automatic formatter, like autopep8 [3];

My *personal* reasoning for using PEP8 [1] and pep8 [2] (outside Buildroot) is:
"Some people that wrote much more Python code than me already thought and
discussed about this to came up with this recommendation"
"I am lazy so I use the tool so I don't need to read the recommendation too
often"

[1] https://www.python.org/dev/peps/pep-0008/
[2] https://pypi.python.org/pypi/pep8
[3] https://pypi.python.org/pypi/autopep8

Regards,
Ricardo

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

end of thread, other threads:[~2017-04-24  1:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-13 23:44 [Buildroot] [RFC] Adopt a coding style for Python scripts Ricardo Martincoski
2017-04-14 17:14 ` Arnout Vandecappelle
2017-04-19 17:00   ` Ricardo Martincoski
2017-04-20  7:17     ` Thomas Petazzoni
2017-04-23 21:34       ` Arnout Vandecappelle
2017-04-24  1:25         ` Ricardo Martincoski
2017-04-19 19:34   ` Thomas De Schampheleire
2017-04-20  6:56     ` Ricardo Martincoski
2017-04-23 21:41       ` Arnout Vandecappelle
2017-04-24  1:28         ` Ricardo Martincoski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.