-
Notifications
You must be signed in to change notification settings - Fork 19
/
.pre-commit-config.yaml
57 lines (53 loc) · 1.43 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
50
51
52
53
54
55
56
57
default_stages: [push]
default_language_version:
python: python3.11
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.278
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: ruff
stages: [commit, push]
name: ruff_format
entry: poetry run ruff format
language: system
types: [python]
- id: mypy
stages: [commit, push]
name: mypy
entry: poetry run mypy --ignore-missing-imports
language: system
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
stages: [commit, push]
- id: check-added-large-files
- id: check-ast
stages: [commit, push]
- id: check-case-conflict
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-docstring-first
stages: [commit, push]
- id: check-json
- id: check-merge-conflict
stages: [commit, push]
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
# - id: flake8
# stages: [commit,push]
- id: forbid-new-submodules
- id: no-commit-to-branch
stages: [commit, push]
args:
- --branch=main