Commit graph

3 commits

Author SHA1 Message Date
Yossi Rozantsev
a0c9dd88ac
Enable linting of stub files (.pyi) in pre-commit hook
Enable support for `pyi` files when using `flake8` through `pre-commit`. This will run flake8 on stub files in addition to source files.
Note that by default flake8 doesn't run checks on `pyi` files, and most commonly the [flake8-pyi plugin](https://pypi.org/project/flake8-pyi/) is used to enable those files types and check them.
However, without the change in the pre-commit config file, the stub files are still ignored.

References:
1. [The same file on black](https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml)
2. [pre-commit docs](https://github.com/psf/black/blob/main/.pre-commit-hooks.yaml)
3. [Same PR on pyupgrade](https://github.com/asottile/pyupgrade/pull/771)
2022-12-21 11:44:20 +00:00
Anthony Sottile
535775e646 Turn off pre-commit's automated multiprocessing
flake8 internally implements multiprocessing, disabling pre-commit's improves performance
2019-01-27 17:26:45 -08:00
Anthony Sottile
ef5ef0d9bf Add https://pre-commit.com metadata 2018-11-21 13:40:48 -08:00