[dev] Upgrading flake8 to support f-strings
smooney at redhat.com
Thu Nov 21 23:12:27 UTC 2019
On Thu, 2019-11-21 at 13:43 -0600, Ben Nemec wrote:
> On 11/21/19 12:15 PM, Jeremy Stanley wrote:
> > On 2019-11-21 17:54:32 +0000 (+0000), Stephen Finucane wrote:
> > [...]
> > > Unfortunately, flake8 3.x is a total rewrite and I haven't found a
> > > way to port things across.
> > [...]
> > > I'm flat out of ideas on that so someone other than me is going to
> > > have to take this migration upon themselves or we're going to have
> > > to drop hacking so we can use a new flake8.
> > [...]
> > Oof, yes I guess it's high time to discuss this (sorry if there was
> > a prior ML thread about it which I missed). So I guess the options
> > I can see are:
> > A. keep running woefully outdated flake8 and friends (isn't working)
> > B. overhaul hacking to work as a file-level analyzer plug-in
> > C. improve flake8 to support string-level analyzer plug-ins
> > D. separate hacking back out so it's no longer a flake8 plug-in
> > E. stop running hacking entirely and rely on other flake8 plug-ins
> > Anything else? For sake of simplicity I'd favor option E. In our
> > present reality where most folks already have far too much work on
> > their respective plates, having one less project to maintain makes
> > some measure of sense. Does hacking currently save teams more than
> > enough effort to balance out the amount of effort involved in
> > keeping it working with newer software?
> That would be unfortunate since I know some teams have extensive custom
> hacking rules to help out their reviewers. That said, I'm not signing
> up to figure out how to make hacking work with modern flake8 and if the
> project is broken with no one to fix it then it's all academic. :-/
> 0: https://github.com/openstack/nova/blob/master/nova/hacking/checks.py
nova only has a couple but it might be intersting to convert those to precommit scripts.
looking through them some of them do seam useful although other are just python 2 vs python 3
guidline that i hope will be less relevant now.
More information about the openstack-discuss