-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
35 lines (35 loc) · 1.17 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
repos:
# run standard pre-commit hooks for basic formatting and valid file formats
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast # checks if files are valid python
- id: fix-byte-order-marker # forbid UTF-8 byte-order markers
- id: check-case-conflict
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- id: detect-private-key # checks for private keys
# run black formatter to ensure code follows convention
- repo: https://github.com/psf/black
rev: '22.3.0'
hooks:
- id: black
language: python
types: [python]
args: ["--line-length=140"]
# run flake8 to check if code has any errors/warnings that need fixed
- repo: https://github.com/pycqa/flake8
rev: '6.0.0'
hooks:
- id: flake8
args: ["--max-line-length=140", "--ignore=E203,W503"]
# run mypy to type check typed functions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.991
hooks:
- id: mypy
args: ["--implicit-optional", "--ignore-missing-imports"]
additional_dependencies: ['types-requests']