[arch-general] [arch-gen][flake8] flake8.main.git module no longer available on flake8 v. 1:4.0.1-1, breaking pre-commit flake8 hooks
Anton Hvornum
anton at hvornum.se
Thu Nov 4 08:53:27 UTC 2021
What git --version are you using and how do you setup your pre-hook?
According to the code changelog [1] this "functionality" was removed
but never added back in [1].
But they do support git hooks [2] in a different way perhaps.
[1] https://github.com/PyCQA/flake8/compare/c6e0d27...82b698e
[2] https://flake8.pycqa.org/en/latest/user/using-hooks.html
Best wishes:
Anton Hvornum
On Thu, Nov 4, 2021 at 6:29 AM Javier via arch-general
<arch-general at lists.archlinux.org> wrote:
>
> Today I upgraded the system, and got a new flake8 version:
>
> > [2021-11-03T02:29:18-0600] [ALPM] upgraded flake8 (1:3.9.2-2 -> 1:4.0.1-1)
>
> However that version no longer provides the flake8.main.git module, therefore now I get a failure when trying to commit something (using the flake8 pre-commit hook the work project uses):
>
> > % git ci --amend
> > INFO | Running hook pre-commit.d/02-check_flake8...
> > ERROR | Traceback (most recent call last):
> > File "/home/vasqueja/scm/hpe/git/provision-sdk/.git/hooks/pre-commit.d/02-check_flake8", line 25, in <module>
> > from flake8.main.git import (config_for, update_excludes,
> > ModuleNotFoundError: No module named 'flake8.main.git'
> > ERROR | Hook pre-commit.d/02-check_flake8 failed. Aborting...
>
> Is there a way to overcome this? Is there sort of a new packet covering for that functionality? I don't see any new optional dependency which might have covered for the missing module:
>
> > Depends On : python-pyflakes python-mccabe python-pycodestyle python-entrypoints
> > Optional Deps : None
> > Required By : python-flake8-polyfill
>
> Thanks !
>
> --
> Javier
More information about the arch-general
mailing list