Тема: AttributeError: 'EntryPoints' object has no attribute 'get'
Після введення команди pre-commit run --all-files, вибиває помилку:
Format YAML files........................................................Failed
- hook id: yamlfmt
- exit code: 1
Executable `C:UsersFamily.cachepre-commitrepomga8empmpy_env-python3.12Scriptspython.EXE` not found
За вказаним шляхом python.exe наявний, але pre-commit його не бачить.
ОС Widnows 10
Python 3.12.1
Pre-commit 3.6.0
Налаштування прекомітта:
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: |
(?x)^(
^.*grpc_stuff.*$|
^.*\/swagger.yaml$|
^.gitlab-ci.*.yml
)$
repos:
- repo: https://github.com/pycqa/flake8
rev: 3.9.2
hooks:
- id: flake8
args: [--max-line-length=120]
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
# - repo: https://github.com/PyCQA/pylint
# rev: v2.15.3
# hooks:
# - id: pylint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-byte-order-marker
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.2
hooks:
- id: yamlfmt
args: [--mapping, '2', --sequence, '4', --offset, '2', '-w', '120', --preserve-quotes, --implicit_start]
Як вийти з цієї ситуації?