-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
135 lines (129 loc) · 4.42 KB
/
pyproject.toml
File metadata and controls
135 lines (129 loc) · 4.42 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
[build-system]
build-backend = "uv_build"
requires = [ "uv-build>=0.11,<0.12" ]
[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 :: Implementation :: CPython",
"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",
"DTZ002", # Useful outside of timezones
]
lint.ignore = [
"COM812", # Conflict with formatter
"CPY", # No copyright statements
"D1", # Docstrings should not be enforced by default
"D203", # Choose D203 or D211
"D212", # Choose D212 or D213
"FIX002", # (project)
"G004", # (project) We don't use `logging`
"G010", # (project) We don't use `logging`
"PLW2901", # (project) Re-assignments are really convenient here
"S404", # Uses of subprocess are rejected, no need to reject the imports as well
"T201", # (project) Print is allowed
"TD003", # (project)
"TRY400", # (project) We don't use `logging`
]
lint.per-file-ignores."tests/**/*.py" = [
"E501", # If the formatter doesn't fix the line length, it's good enough
"FBT", # We don't care about boolean parameters in tests
"INP001", # Tests are supposed to be an implicit namespace
"PLR2004", # Magic values are allowed in tests
"S101", # Assert is 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/"
show_error_context = true
show_error_codes = true
pretty = true
warn_unused_configs = true
strict = true # All strict checks are already listed below, only here for future-proofing
# 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
extra_checks = true
implicit_reexport = false
strict_concatenate = true
strict_equality = true
strict_bytes = true
enable_error_code = [
"redundant-self",
"deprecated",
"redundant-expr",
"possibly-undefined",
"truthy-bool",
"truthy-iterable",
"ignore-without-code",
"unused-awaitable",
"possibly-undefined",
"mutable-override",
"exhaustive-match",
]