forked from teemtee/tmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
133 lines (121 loc) · 5.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/hhatto/autopep8
rev: 'v2.1.0'
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- id: check-toml
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
# TODO: find out how to amend mypy, pyright, pre-commit and package requirements.
# Apparently, there is no easy way to avoid some level of duplication of
# information when the package is *not* installed, which is the case of tmt
# & pre-commit in our setup.
#
# For now, we simply copy & paste from pyproject.toml :(
additional_dependencies:
- "click>=8.0.3,!=8.1.4" # 8.1.3 / 8.1.6 TODO type annotations tmt.cli.Context -> click.core.Context click/issues/2558
- "docutils>=0.16" # 0.16 is the current one available for RHEL9
- "fmf>=1.3.0"
- "jinja2>=2.11.3" # 3.1.2 / 3.1.2
- "pint>=0.16.1,<0.20" # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
- "pygments>=2.7.4" # 2.7.4 is the current one available for RHEL9
- "requests>=2.25.1" # 2.28.2 / 2.31.0
- "ruamel.yaml>=0.16.6" # 0.17.32 / 0.17.32
- "urllib3>=1.26.5, <2.0" # 1.26.16 / 2.0.4
# report-junit
- "junit_xml>=1.9"
- "typing-extensions>=4.4.0; python_version < '3.10'" # TypeAlias introduced in 3.10, Self in 3.11
- "pytest"
- "requre"
# Do not install *types-click* - it's not recommended with Click 8 & newer,
# which is the version a developer encounters given the requirements are not
# frozen.
- "types-Markdown"
# prevent conflict between types-requests and urllib3
- "types-requests<2.31.0.7; python_version < '3.10'"
- "types-requests; python_version >= '3.10'"
- "types-setuptools"
- "types-jsonschema"
- "types-urllib3"
- "types-jinja2"
- "types-babel"
- "types-docutils"
pass_filenames: false
args: [--config-file=pyproject.toml]
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.355
hooks:
- id: pyright
# TODO: find out how to amend mypy, pyright, pre-commit and package requirements.
# Apparently, there is no easy way to avoid some level of duplication of
# information when the package is *not* installed, which is the case of tmt
# & pre-commit in our setup.
#
# For now, we simply copy & paste from pyproject.toml :(
additional_dependencies:
- "click>=8.0.3,!=8.1.4" # 8.1.3 / 8.1.6 TODO type annotations tmt.cli.Context -> click.core.Context click/issues/2558
- "docutils>=0.16" # 0.16 is the current one available for RHEL9
- "fmf>=1.3.0"
- "jinja2>=2.11.3" # 3.1.2 / 3.1.2
- "pint>=0.16.1,<0.20" # 0.16.1 / 0.19.x TODO: Pint 0.20 requires larger changes to tmt.hardware
- "pygments>=2.7.4" # 2.7.4 is the current one available for RHEL9
- "requests>=2.25.1" # 2.28.2 / 2.31.0
- "ruamel.yaml>=0.16.6" # 0.17.32 / 0.17.32
- "urllib3>=1.26.5, <2.0" # 1.26.16 / 2.0.4
# report-junit
- "junit_xml>=1.9"
- "typing-extensions>=4.4.0; python_version < '3.10'" # TypeAlias introduced in 3.10, Self in 3.11
- "pytest"
- "requre"
# Do not install *types-click* - it's not recommended with Click 8 & newer,
# which is the version a developer encounters given the requirements are not
# frozen.
- "types-Markdown"
# prevent conflict between types-requests and urllib3
- "types-requests<2.31.0.7; python_version < '3.10'"
- "types-requests; python_version >= '3.10'"
- "types-setuptools"
- "types-jsonschema"
- "types-urllib3"
- "types-jinja2"
- "types-babel"
- "types-docutils"
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: "0.28.0"
hooks:
- id: check-metaschema
name: "Check JSON schemas validity"
files: ^tmt/schemas/.*\.yaml
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
- id: yamllint
files: ^tmt/schemas/.*\.yaml
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.3
hooks:
- id: ruff
args:
- '--fix'
- '--show-fixes'
- repo: https://github.com/teemtee/tmt.git
rev: 1.31.0
hooks:
- id: tmt-lint
additional_dependencies:
- "docutils>=0.16" # 0.16 is the current one available for RHEL9
- "pint<0.20"
- "pygments>=2.7.4" # 2.7.4 is the current one available for RHEL9
# Help installation by reducing the set of inspected botocore release.
# There is *a lot* of them, and hatch might fetch many of them.
- "botocore>=1.25.10" # 1.25.10 is the current one available for RHEL9