mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-15 06:22:02 +08:00
Improve pre-commit config (#9563)
- Add a few more hooks. These are all very fast, and I've found them useful in other projects:
- Autofixes:
- `trailing-whitespace`: fixes trailing whitespace
- `requirements-txt-fixer`: alphabetises items in `requirements.txt` files
- `end-of-file-fixer`: makes sure every file ends with a single newline character
- `mixed-line-ending`: Makes sure Windows users don't accidentally introduce CRLF line endings into a file that uses LF line endings
- None-autofixes:
- `check-yaml`: loads YAML files to validate syntax
- `check-toml`: loads TOML files to validate syntax
- `check-merge-conflict`: detects merge-conflict strings in files and blocks them from accidentally being committed
- `check-case-conflict`: checks for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT; blocks them from being committed.
- Change the bot schedule to quarterly, to reduce noisy PRs
- Change the `black` language target-version to Python 3.10, synching the setting here with the changes that were made to our `pyproject.toml` file in #7538
This commit is contained in:
@@ -8,9 +8,10 @@ isort==5.11.4 # must match .pre-commit-confi
|
||||
mypy==0.991
|
||||
packaging==23.0
|
||||
pathspec>=0.10.3
|
||||
pre-commit-hooks==4.4.0 # must match .pre-commit-config.yaml
|
||||
pycln==2.1.3 # must match .pre-commit-config.yaml
|
||||
pyyaml==6.0
|
||||
pytype==2023.1.17; platform_system != "Windows" and python_version < "3.11"
|
||||
pyyaml==6.0
|
||||
termcolor>=2
|
||||
tomli==2.0.1
|
||||
tomlkit==0.11.6
|
||||
|
||||
Reference in New Issue
Block a user