-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy path.pre-commit-config.yaml
41 lines (39 loc) · 1.12 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
---
repos:
- repo: https://github.com/ambv/black
rev: 23.3.0
hooks:
- id: black
language_version: python3.10
args: [--line-length=119]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.277"
hooks:
- id: ruff-autofix
args: [--fix]
- repo: local
# We do not use pre-commit/mirrors-mypy,
# as it comes with opinionated defaults
# (like --ignore-missing-imports)
# and is difficult to configure to run
# with the dependencies correctly installed.
hooks:
- id: mypy
name: mypy
entry: mypy
language: python
language_version: python3.10
additional_dependencies: ["mypy==1.4.1"]
types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# Print the number of files as a sanity-check
verbose: true
args:
- --ignore-missing-imports
- --follow-imports=skip
- --install-types
- --non-interactive
- --strict-optional
- --disallow-any-generics