Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (131 loc) · 4.97 KB
/
Copy pathpyproject.toml
File metadata and controls
137 lines (131 loc) · 4.97 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
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
134
135
136
137
[build-system]
build-backend = "uv_build"
requires = [ "uv-build>=0.13,<0.14" ]
[project]
name = "pre-commit-hooks"
version = "3.0.0"
description = "Checks if Docker images are properly pinned in docker-compose.yml and Dockerfile files"
readme = "README.md"
license = "GPL-3.0-only"
authors = [
{ name = "GideonBear", email = "dig-sultry-sedate@duck.com" },
]
requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Quality Assurance",
"Topic :: Software Development :: Version Control :: Git",
"Typing :: Typed",
]
dependencies = [
"ghtoken>=0.1.2",
"more-itertools>=10.8",
"packaging>=25",
"requests>=2.32.5",
"ruamel-yaml>=0.18.16",
"termcolor>=3.3",
]
urls.bugs = "https://github.com/GideonBear/pre-commit-hooks/issues"
urls.homepage = "https://github.com/GideonBear/pre-commit-hooks"
scripts.bumpsync = "pre_commit_hooks.bumpsync:main"
scripts.docker-apt-renovate = "pre_commit_hooks.docker_apt_renovate:main"
scripts.docker-image-pin = "pre_commit_hooks.docker:main"
scripts.gha-pin = "pre_commit_hooks.gha:main"
scripts.pre-commit-additional-dependencies = "pre_commit_hooks.pcad:main"
scripts.pre-commit-ci-skip = "pre_commit_hooks.pccs:main"
scripts.pre-commit-config-fmt = "pre_commit_hooks.pccf:main"
scripts.pre-commit-config-sections = "pre_commit_hooks.sections:main"
scripts.set-euo-pipefail = "pre_commit_hooks.set_euo_pipefail:main"
scripts.shfuncdecfmt = "pre_commit_hooks.shfuncdecfmt:main"
[dependency-groups]
dev = [
"pytest>=9.0.1",
"responses>=0.25.8",
]
[tool.ruff]
format.preview = true
format.nested-string-quote-style = "preferred"
lint.select = [
"ALL",
"call-datetime-today", # Useful outside of timezones
]
lint.ignore = [
"CPY", # No copyright statements
"D1", # Docstrings should not be enforced by default
"error-instead-of-exception", # (project) We don't use `logging`
"incorrect-blank-line-before-class", # Choose D203 or D211
"line-contains-todo", # (project)
"logging-f-string", # (project) We don't use `logging`
"logging-warn", # (project) We don't use `logging`
"missing-todo-link", # (project)
"missing-trailing-comma", # Conflict with formatter
"multi-line-summary-first-line", # Choose D212 or D213
"print", # (project) Print is allowed
"redefined-loop-name", # (project) Re-assignments are really convenient here
"suspicious-subprocess-import", # Uses of subprocess are rejected, no need to reject the imports as well
]
lint.per-file-ignores."tests/**/*.py" = [
"assert", # Assert is allowed in tests
"FBT", # We don't care about boolean parameters in tests
"implicit-namespace-package", # Tests are supposed to be an implicit namespace
"line-too-long", # If the formatter doesn't fix the line length, it's good enough
"magic-value-comparison", # Magic values are allowed in tests
]
lint.flake8-tidy-imports.ban-relative-imports = "all" # For consistency
lint.isort.combine-as-imports = true
lint.isort.lines-after-imports = 2
lint.isort.required-imports = [ "from __future__ import annotations" ]
lint.preview = true
[tool.deptry]
package_module_name_map.ruamel-yaml = "ruamel"
[tool.pyproject-fmt]
indent = 4
[tool.mypy]
exclude = "^tests/"
# It already warns for the import, so we do not want to warn for each individual use.
# If the import is silenced, there's nothing else we can do so silence the uses as well.
# disallow_any_unimported = true
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_return_any = true
warn_unreachable = true
enable_error_code = [
"deprecated",
"exhaustive-match",
"ignore-without-code",
"mutable-override",
"possibly-undefined",
"possibly-undefined",
"redundant-expr",
"redundant-self",
"truthy-bool",
"truthy-iterable",
"unused-awaitable",
]
extra_checks = true
implicit_reexport = false
strict_concatenate = true
strict_equality = true
strict_bytes = true
strict = true # All strict checks are already listed here, only here for future-proofing
show_error_context = true
pretty = true
warn_unused_configs = true
show_error_codes = true