I'm trying to run flakehell as pre-commit hook.
my .pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: flakehell
name: flakehell
entry: flakehell lint project/
language: python
pass_filenames: true
stages: [push, commit]
verbose: true
pyproject.toml:
[tool.flakehell]
exclude = ["README.md"]
format = "colored"
show_source = true
[tool.flakehell.plugins]
flake8-bandit = ["+*", "-S322"]
flake8-bugbear = ["+*"]
flake8-builtins = ["+*"]
flake8-comprehensions = ["+*"]
flake8-darglint = ["+*"]
flake8-docstrings = ["+*"]
flake8-eradicate = ["+*"]
flake8-isort = ["+*"]
flake8-mutable = ["+*"]
flake8-pytest-style = ["+*"]
flake8-spellcheck = ["+*"]
mccabe = ["+*"]
pep8-naming = ["+*"]
pycodestyle = ["+*"]
pyflakes = ["+*"]
pylint = ["+*"]
Still have some problems. When I try to use git commit I see that flakehell started working. After a few seconds it fails and I got the error:
"UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 10: invalid start byte"
Without "pre-commit" it works great (I mean when I just type "flakehell lint")
Is it even possible to configure flakehell as pre-commit?
If not - do you recommend any better/working solution for python projects?