RFC: Exceptions to PEP-8 Adoption for RTEMS Tools

Amar Takhar amar at rtems.org
Wed Mar 18 18:24:58 UTC 2020


The only one I would like to propose is the 80 character limit.  This should be 
moved to something more reasonable such as 120.

Code comments should remain below 80 however.

Python itself has not followed this rule for a long time you can see many lines 
over 80 in the Python source itself.

Also, due to the nature of the language most lines end up below 80 characters 
anyway.  Python is not an easy language to read when you have to break long 
lines into 2 especially when you start breaking up strings.

I'm with most of the developers here -- 80 characters as been the norm for a 
very long time however this is no longer true for new developers.  There are 
already examples in our own rtems-tool codebase that make no sense being split:

  https://git.rtems.org/rtems-tools/tree/rtemstoolkit/execute.py?id=274981f77d648ceb87f84cdeaec33a58dfd37385#n579

I've ran into this more than once where a Python developer ends up in confusion 
when reading source that has line breaks to keep under line lengths.

I'd like to go the direction the wind is blowing on this and relax this rule to 
120 for source, 80 for documentation where possible.

This is of course applied to cases where leaving the line long makes sense.  A 
function with 20 parameters shouldn't be in a long line that is a disaster in 
any language.


Amar.


More information about the devel mailing list