Closed wizard-28 closed 2 years ago
I'm using pre-commit with Poetry so I'm using the local repo to use isort rather than the official hook.
pre-commit
Poetry
local
Here's my config
- repo: local hooks: - id: isort name: iSort description: Automatically sort import statements types_or: [cython, pyi, python] entry: poetry run isort args: ["--py auto", "-p cmds", "-p api", "-o rich", "-o requests", "--filter-files"] language: system require_serial: true
When the hook is run, this error message is printed
isort: error: unrecognized arguments: pacstall/cmds/download.py
Here pacstall/cmds/download.py is the concerned file.
pacstall/cmds/download.py
How to fix this issue? Is this issue related to pre-commit instead?
Fixed with adding = between the flags and their arguments.
=
args: ["--py=auto", "-p=cmds", "-p=api", "-o=rich", "-o=requests", "--filter-files"]
I'm using
pre-commit
withPoetry
so I'm using thelocal
repo to use isort rather than the official hook.Here's my config
When the hook is run, this error message is printed
Here
pacstall/cmds/download.py
is the concerned file.How to fix this issue? Is this issue related to
pre-commit
instead?