-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
54 lines (54 loc) · 1.74 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
repos:
- repo: local
hooks:
- id: ruff-check
name: Run ruff check
entry: ruff check
args: [src/, tests/]
language: python
types_or: [python, pyi]
pass_filenames: true
require_serial: true
- id: ruff-format-check
name: Check if code has been formatted with Ruff
entry: ruff format
args: [--check, src/, tests/]
language: python
types_or: [python, pyi]
- id: check-added-large-files
name: Check for added large files
entry: check-added-large-files
language: system
- id: check-toml
name: Check Toml
entry: check-toml
language: system
types: [toml]
- id: check-yaml
name: Check Yaml
entry: check-yaml
language: system
types: [yaml]
- id: end-of-file-fixer
name: Fix End of Files
entry: end-of-file-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
- id: trailing-whitespace
name: Trim Trailing Whitespace
entry: trailing-whitespace-fixer
language: system
types: [text]
stages: [pre-commit, pre-push, manual]
# Pre-commit runs pyright-python in its own virtual environment by
# default which means it does not detect installed dependencies. The
# virtual env can be specified in pyrightconfig.json via the "venvPath"
# and "venv" variables. However, this doesn't seem to work with
# conda/mamba environments and is less robust anyway.
# - id: pyright
# name: pyright
# entry: pyright src/ --verbose
# language: python
# 'types_or': [python, pyi]
# require_serial: true