-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
50 lines (50 loc) · 1.83 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
50 lines (50 loc) · 1.83 KB
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
# This file contains 2 stages
# pre-commit stage - runs by default pre-commit
# manual stage - runs the same tools but modifies files
# run as: pre-commit run --all-files --hook-stage manual
repos:
# See README.md for more information on this pre-commit hook
# Please uncomment this hook if you are a Red Hat employee, and make sure you don't commit it back upstream
# - repo: https://gitlab.cee.redhat.com/infosec-public/developer-workbench/tools.git
# rev: rh-pre-commit-2.3.0
# hooks:
# # If you have not run this hook on your system before, it may prompt you to
# # log in for patterns, and you will need to try again.
# #
# # Docs: https://source.redhat.com/departments/it/it-information-security/leaktk/leaktk_components/rh_pre_commit
# - id: rh-pre-commit
# name: Red Hat pre-commit (check)
# # - id: rh-pre-commit.commit-msg # Optional for commit-msg attestation
- repo: https://github.com/PyCQA/docformatter
rev: v1.7.7
hooks:
- id: docformatter
name: docformatter (check)
additional_dependencies: [tomli]
args: [--check, --config, ./pyproject.toml]
stages: [pre-commit]
- id: docformatter
name: docformatter (fix)
additional_dependencies: [tomli]
args: [--in-place, --config, ./pyproject.toml]
stages: [manual]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
name: black (check)
args: [--check]
stages: [pre-commit]
- id: black
name: black (fix)
stages: [manual]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.1
hooks:
- id: ruff-check
name: ruff linter (check)
stages: [pre-commit]
- id: ruff-check
name: ruff linter (fix)
args: [--fix]
stages: [manual]