This commit is contained in:
Stephan Jaensch 2017-08-16 05:53:21 +00:00 committed by GitHub
commit 3eb6ebddf3
3 changed files with 18 additions and 0 deletions

View file

@ -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

View file

@ -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.

View file

@ -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