[all][tc] Lets talk about Flake8 E501

Slawek Kaplonski skaplons at redhat.com
Wed Jun 1 20:51:53 UTC 2022


Hi,

Dnia wtorek, 31 maja 2022 15:21:50 CEST Sylvain Bauza pisze:
> Le sam. 28 mai 2022 à 04:36, Miro Tomaska <mtomaska at redhat.com> a écrit :
> 
> > Hello All,
> >
> > This is probably going to be a hot topic but I was wondering if the
> > community ever considered raising the default 79 characters line limit. I
> > have seen some places where even a very innocent line of code needs to be
> > split into two lines. I have also seen some code where I feel like variable
> > names were abbreviated on purpose to squeeze everything into one line.
> >
> > How does the community feel about raising the E501 limit to 119
> > characters? The 119 character limit is the second most popular limit
> > besides the default one. It's long enough to give a developer enough room
> > for descriptive variables without being forced to break lines too much. And
> > it is short enough for a diff between two files to look OK.
> >
> > The only downside I can see right now is that it's not easy to convert an
> > existing code. So we will end up with files where the new code is 79+
> > characters and the "old" code is <=79. I can also see an argument where
> > someone might have trouble reviewing a patch on a laptop screen (assuming
> > standard 14" screen) ?
> >
> > Here is an example of one extreme, a diff of two files maxing out at 119
> > characters
> >
> > https://review.opendev.org/c/opendev/sandbox/+/843697/1..2
> >
> > Thank you for your time and I am looking forward to this conversation :)
> >
> >
> 
> My personal opinion is while I understand the reasoning behind, my concern
> is about the community support. We don't have a lot of contributors at the
> moment, and if we would like to modify the default limit, I'm pretty sure
> it would take a lot of time for folks at least reviewing some changes that
> are not really priorities...
> 
> Also, as said by some folks, changing the default would also create some
> problems for some of our contributors and eventually, if some projects
> would accept 119 characters while some others not,  it would also be a new
> community difference between projects... (and yet again some new nit that
> new contributors need to understand)
> 
> Sorry, -1 for those reasons.

I don't have strong opinion about it but I see that e.g. You are saying that this should be changed (or stay like it is now) globally for all projects but earlier fungi said that there wasn't such requirement from e.g. TC to have this configured in same way for all projects. So IIUC every project can actually change it on their own if team wants to do that.

Personally I agree with Your point that it should be done for all projects in the same way so maybe TC should have some guidance/rules for that to make sure all projects will follow the same pattern. Wdyt?

> 
> 
> 
> --
> > Miro Tomaska
> > irc: mtomaska
> > Red Hat
> >
> 


-- 
Slawek Kaplonski
Principal Software Engineer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20220601/93c1a55c/attachment-0001.sig>


More information about the openstack-discuss mailing list