mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
Merge 8518c0a772 into 31d9774748
This commit is contained in:
commit
3eb6ebddf3
3 changed files with 18 additions and 0 deletions
|
|
@ -191,6 +191,15 @@
|
||||||
# for backward compatibility
|
# for backward compatibility
|
||||||
files: ''
|
files: ''
|
||||||
minimum_pre_commit_version: 0.15.0
|
minimum_pre_commit_version: 0.15.0
|
||||||
|
- id: mypy
|
||||||
|
name: mypy
|
||||||
|
description: This hook runs mypy.
|
||||||
|
entry: mypy
|
||||||
|
language: python
|
||||||
|
types: [python]
|
||||||
|
# for backward compatibility
|
||||||
|
files: ''
|
||||||
|
minimum_pre_commit_version: 0.15.0
|
||||||
- id: name-tests-test
|
- id: name-tests-test
|
||||||
name: Tests should end in _test.py
|
name: Tests should end in _test.py
|
||||||
description: This verifies that test files are named correctly
|
description: This verifies that test files are named correctly
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ Add this to your `.pre-commit-config.yaml`
|
||||||
- `file-contents-sorter` - Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input to it. Note that this hook WILL remove blank lines and does NOT respect any comments.
|
- `file-contents-sorter` - Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input to it. Note that this hook WILL remove blank lines and does NOT respect any comments.
|
||||||
- `flake8` - Run flake8 on your python files.
|
- `flake8` - Run flake8 on your python files.
|
||||||
- `forbid-new-submodules` - Prevent addition of new git submodules.
|
- `forbid-new-submodules` - Prevent addition of new git submodules.
|
||||||
|
- `mypy` - Run mypy on your python files.
|
||||||
|
- Use `files: ^my_package/.+\.py$` to exclude test and other files from being checked.
|
||||||
|
- Use `args: ['--config-file', 'mypy-pre-commit.ini']` to use a custom mypy configuration for this pre-commit hook.
|
||||||
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
|
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
|
||||||
- Use `args: ['--django']` to match `test*.py` instead.
|
- Use `args: ['--django']` to match `test*.py` instead.
|
||||||
- `no-commit-to-branch` - Protect specific branches from direct checkins.
|
- `no-commit-to-branch` - Protect specific branches from direct checkins.
|
||||||
|
|
|
||||||
|
|
@ -130,6 +130,12 @@
|
||||||
entry: upgrade-your-pre-commit-version
|
entry: upgrade-your-pre-commit-version
|
||||||
files: ''
|
files: ''
|
||||||
minimum_pre_commit_version: 0.15.0
|
minimum_pre_commit_version: 0.15.0
|
||||||
|
- id: mypy
|
||||||
|
language: system
|
||||||
|
name: upgrade-your-pre-commit-version
|
||||||
|
entry: upgrade-your-pre-commit-version
|
||||||
|
files: ''
|
||||||
|
minimum_pre_commit_version: 0.15.0
|
||||||
- id: name-tests-test
|
- id: name-tests-test
|
||||||
language: system
|
language: system
|
||||||
name: upgrade-your-pre-commit-version
|
name: upgrade-your-pre-commit-version
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue