-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
44 lines (44 loc) · 1.29 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
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [
flake8-docstrings,
flake8-comprehensions,
]
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
- repo: local
hooks:
# Adapted from the following guide for running Mypy
# as a pre-commit hook:
#
# "Running Mypy in Pre-commit"
# https://jaredkhan.com/blog/mypy-pre-commit
#
# (using Option 2 to run mypy with the virtual environment's
# Python interpreter)
#
# Heavily WIP and subject to change. I haven't used Mypy before,
# as a pre-commit hook or otherwise.
- id: mypy
name: mypy
entry: "./run-mypy"
language: python
# use your preferred Python version
language_version: python3.11
# additional_dependencies: ["mypy==0.991"]
# trigger for commits changing Python files
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