Background
It's become pretty popular to use .pre-commit-config.yaml to define linting, type-checking, and autoformatting dependencies and processes in Python projects. Many projects go as far as to no longer specify flake8 dependencies in their requirements.txt/pyproject.tom/setup.py.
Unfortunately, it seems vscode-python does not play well with pre-commit.
When cloning a project, the most reliable approach I've found it to
- Parse the
.pre-commit-config.yml for dependencies
- Manually create an environment with the linting dependencies
- Add the environment path manually to
python.linting.pylintPath.
If anyone has a better workflow, I'd love to know!
Proposal
Support pre-commit as a linter, formatter, and type checker. Adding pre-commit as one of these would use pre-commit run to run the appropriate linting steps (e.g. pre-commit run flake8 --files).
Thanks for the project, I've really enjoyed the Python plugin!
Background
It's become pretty popular to use
.pre-commit-config.yamlto define linting, type-checking, and autoformatting dependencies and processes in Python projects. Many projects go as far as to no longer specify flake8 dependencies in theirrequirements.txt/pyproject.tom/setup.py.Unfortunately, it seems vscode-python does not play well with pre-commit.
When cloning a project, the most reliable approach I've found it to
.pre-commit-config.ymlfor dependenciespython.linting.pylintPath.If anyone has a better workflow, I'd love to know!
Proposal
Support pre-commit as a linter, formatter, and type checker. Adding pre-commit as one of these would use
pre-commit runto run the appropriate linting steps (e.g.pre-commit run flake8 --files).Thanks for the project, I've really enjoyed the Python plugin!