[dev] Upgrading flake8 to support f-strings

Sean Mooney smooney at redhat.com
Fri Nov 22 14:19:04 UTC 2019

On Fri, 2019-11-22 at 13:58 +0000, Jeremy Stanley wrote:
> On 2019-11-22 13:51:10 +0000 (+0000), Sorin Sbarnea wrote:
> [...]
> > I am glad someone else opened the pre-commit subject before me.
> > While it comes with its own challenges (git cloning), pre-commit
> > resolves the problem of having predictable linter results by
> > pinning them. Also it enables vey easy bumping of all of them.
> [...]
> Is it still limited by only being able to install plugins from
> source, or can it consume released packages now?
i think that was a fundemetal design choice they made to only supprot
git and not packages. the one thing i wish they would add support for
is the ablity to define a set of global hooks in you home directory

e.g. ~/.config/.pre-commit.yaml

so that you did not only have the choice of defining them in tree.
or have the ablity to pass a file to use. if they supported either
then we could use this ourselve without haveing to submit patches
patches upstream. since we cant i have gone back to try spacemacs
instead of using nano to see i can leverage the checkers built
into that emacs distribution instead.

i am likeing have a spell checker and auto indentation
without having to go to a full idea like pycharm to get it.
i love pycharm but i like codeing in a terminal too. 
> > Extra bonus: we can avoid the case where we end-up having tons of
> > jobs performing linting or style checks.
> Which can also be done by adding multiple check commands to a single
> tox testenv, or passing the names of multiple testenvs when invoking
> tox. Granted, tox is a fairly Python-oriented test tool, so
> pre-commit may be a more language-agnostic choice in that regard.
yep but its a fair point. if the was ever added to the PTI i would
expeact aht we would define a tox env from running all the pre-commit
checks but i dont see that a major priority.

More information about the openstack-discuss mailing list