[PATCH v1 2/2] doc: increase python max line to 88

Stephen Hemminger stephen at networkplumber.org
Thu Nov 10 17:27:24 CET 2022


On Thu, 10 Nov 2022 09:15:16 +0000
Juraj Linkeš <juraj.linkes at pantheon.tech> wrote:

> > -----Original Message-----
> > From: Stephen Hemminger <stephen at networkplumber.org>
> > Sent: Friday, November 4, 2022 5:58 PM
> > To: Juraj Linkeš <juraj.linkes at pantheon.tech>
> > Cc: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>; Owen Hilyard
> > <ohilyard at iol.unh.edu>; thomas at monjalon.net; Lijuan Tu
> > <lijuan.tu at intel.com>; Richardson, Bruce <bruce.richardson at intel.com>;
> > dev at dpdk.org
> > Subject: Re: [PATCH v1 2/2] doc: increase python max line to 88
> > 
> > On Fri, 4 Nov 2022 09:16:13 +0000
> > Juraj Linkeš <juraj.linkes at pantheon.tech> wrote:
> >   
> > > > +max_line_length = 88 #
> > > >  
> > +https://black.readthedocs.io/en/stable/the_black_code_style/current_sty  
> > > > +le.html#li  
> > 
> > Skip the comment, it caused your line break!  
> 
> The fact that the line is a bit longer does not make the line less readable, as the link is there to be copy-pasted (and I don't think anyone reads the full hyperlinks - the knowledge of domain is enough). As such I think it's better to include the link as it serves as self-documentation (that we're deviating from the standard).
> 
> We could move the comment before or after the max_line_length option and that would result in lines below 100 characters (which is what .editorconfig prescribes). I used that in my one of my local versions, but it was less readable in my opinion. I'd rather break the rule and have it be more readable.
> 
> Of course, not having the comment is fine, since we document it in the coding style guide. I just think there's no (or very little) downside and some upside (more than downside) in adding the comment.

The choice of max line length is project specific. Referencing some other style guide
doesn't seem necessary.  My choice would be to use 100 like the other C code.


More information about the dev mailing list