I installed Pyton 3.6.8 on my system.
python3 --version //-> Python 3.6.8
python3.6 --version //-> Python 3.6.8
My pre-commit-config.yaml is:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
language_version: python3.6
I installed the pre-commit hook for my project. Every time when I want to commit some changes to git, the pre-commit is running with the flake8 error:
TYP005 NamedTuple does not support defaults in 3.6.0
This is true for Python 3.6.0, because this feature is introduced and allowed with Python 3.6.1+. https://docs.python.org/3.6/library/typing.html#typing.NamedTuple
How can I configure flake8 to run with Python 3.6.8?
EDIT When I run flake8 file.rb, I don`t get the error message TYP005.
python3 -m pip install flake
flake --version //-> 3.7.9 (the same version as in the pre-commit script file)