-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
49 lines (43 loc) · 1.91 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# Install in your local dev environment
# > pip install --upgrade --user pre-commit
# Enable the hooks for this repo
# > pre-commit install
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-added-large-files # Prevents giant files from being committed
exclude: |
(?x)^(
chromecast-receiver/cc-receiver-logo.png|
media/cc-receiver-logo.svg
)$
- id: check-yaml # Checks yaml files for parseable syntax
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline
- id: trailing-whitespace # Trims trailing whitespace
exclude: startlist_test.py # Test data has intentional EOL whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
- id: mypy # Run mypy to check typeing
additional_dependencies:
- types-python-dateutil
- types-requests
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks # Detect common mistake of using single backticks when writing rst
- id: rst-directive-colons # Detect mistake of rst directive not ending with double colon or space before the double colon
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst
- id: text-unicode-replacement-char # Forbid files which have a UTF-8 Unicode replacement character
- repo: https://github.com/psf/black
rev: "23.3.0"
hooks:
- id: black # Run "black" for standardized code formatting
- repo: https://github.com/PyCQA/isort
rev: "5.12.0"
hooks:
- id: isort # Sort imports
args: ["--profile", "black", "--filter-files"]