You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When isort is installed as part of a pre-commit hook, it needs to be installed with setuptools' "extras" for pyproject.
This is installed with pip install isort[pyproject] rather than the default install of pip install isort. When installing from a local repo, the command is pip install .[pyproject]
Is it possible to specify that in a .pre-commit-hooks.yaml?
Ah, this used to bite me all the time! This solution (.[extra]) is a lot nicer than anything I ever came up with. I wonder if it's worth noting this trick in the docs somewhere? I guess it's low priority because isort no longer has these set up as extras, but still, this is a really nice solution and I feel like it should be more visible.
When isort is installed as part of a pre-commit hook, it needs to be installed with setuptools' "extras" for
pyproject
.This is installed with
pip install isort[pyproject]
rather than the default install ofpip install isort
. When installing from a local repo, the command ispip install .[pyproject]
Is it possible to specify that in a
.pre-commit-hooks.yaml
?Ref PyCQA/isort#1225
Thank you!
The text was updated successfully, but these errors were encountered: