-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
212 lines (191 loc) · 5.64 KB
/
pyproject.toml
File metadata and controls
212 lines (191 loc) · 5.64 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "taskfile-help"
version = "0.4.2"
description = "Dynamic Taskfile help generator with automatic grouping and namespace support"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"pyyaml>=6.0.3",
"python-dotenv>=1.0.0",
]
authors = [
{ name = "Roy Wright", email = "roy@wright.org" }
]
license = "MIT"
license-file = ["LICENSE"]
keywords = ["taskfile", "task", "help", "cli", "yaml"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Build Tools",
"Topic :: Utilities",
]
[project.scripts]
taskfile-help = "taskfile_help.taskfile_help:main"
[project.urls]
Homepage = "https://github.com/royw/taskfile_help"
Repository = "https://github.com/royw/taskfile_help"
Issues = "https://github.com/royw/taskfile_help/issues"
[dependency-groups]
dev = [
"coverage>=7.11.0",
"deadcode>=2.4.1",
"mkdocs>=1.6.1",
"mkdocs-gen-files>=0.5.0",
"mkdocs-git-revision-date-localized-plugin>=1.4.7",
"mkdocs-git-revision-date-plugin>=0.3.2",
"mkdocs-literate-nav>=0.6.2",
"mkdocs-material>=9.6.22",
"mkdocs-mermaid2-plugin>=1.2.3",
"mkdocstrings>=0.30.1",
"mkdocstrings-python>=1.18.2",
"mypy>=1.18.2",
"pylint>=4.0.2",
"pymarkdownlnt>=0.9.33",
"pytest>=8.4.2",
"pytest-anyio>=0.0.0",
"pytest-cov>=7.0.0",
"pytest-timeout>=2.4.0",
"radon>=6.0.1",
"ruff>=0.14.2",
"twine>=6.2.0",
"types-pyyaml>=6.0.12.20250915",
"version-bumper>=0.1.2",
]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
# Additional strictness for better type safety
disallow_any_generics = true
disallow_subclassing_any = true
# Enable additional error codes for better checking
enable_error_code = ["misc", "type-arg", "assignment"]
# Per-module overrides
# [[tool.mypy.overrides]]
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = 80
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"N", # pep8-naming
"S", # flake8-bandit
"T20", # flake8-print
"SIM", # flake8-simplify
"C901", # mccabe complexity
"E402", # Module level import not at top of file
"TID", # flake8-tidy-imports (detects banned imports and import style issues)
"PLC", # Pylint convention
]
ignore = [
"S101", # Use of assert detected
"TID252", # Prefer absolute imports over relative imports (we'll fix this separately)
]
per-file-ignores = { "tests/*" = ["S101"] }
# Avoiding flagging (and removing) any codes starting with `V` from any
# `# noqa` directives, despite Ruff's lack of support for `vulture`.
external = [
"DC" # deadcode
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
# Configure ruff's built-in isort to match project preferences
known-first-party = ["taskfile_help"]
section-order = ["future", "standard-library", "third-party", "first-party", "local-folder"]
lines-after-imports = 2
force-single-line = false
combine-as-imports = true
force-sort-within-sections = true
[tool.ruff.lint.flake8-tidy-imports]
# Ban function-level imports - all imports should be at module level
ban-relative-imports = "all"
[tool.pytest.ini_options]
testpaths = ["tests/unit", "tests/e2e"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--cov=src/taskfile_help",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-config=pyproject.toml",
]
markers = [
"slow: marks tests as slow (deselect with '-m not slow')",
]
[tool.coverage.run]
source = ["src"]
omit = [
"tests/*",
"src/taskfile_help/__main__.py", # Module entry point, tested via subprocess
]
parallel = true
concurrency = ["thread", "multiprocessing"]
disable_warnings = ["no-data-collected"]
[tool.coverage.paths]
source = ["src/", "*/site-packages/"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"^\\s*\\.\\.\\.\\s*$", # Exclude protocol stub methods with just ...
"@(abc\\.)?abstractmethod", # Exclude abstract methods
]
skip_covered = false # Show files with 100% coverage instead of hiding them
[tool.deadcode]
# Functions/methods to ignore - used in testing infrastructure or by decorators
ignore-names = [
# CLI commands (decorated with @app.command)
"main",
]
[tool.taskfile-help]
# Search paths for Taskfiles
search-dirs = [".", "taskfiles"]
[tool.dev-metrics]
# Paths for metrics calculation
src-paths = "src"
tests-paths = "tests"
# Tool paths (can be overridden for custom installations)
radon-path = ["uv", "run", "radon"]
pylint-path = ["uv", "run", "pylint"]
pytest-path = ["uv", "run", "pytest"]
# Test file configuration
test-pattern = "test_*.py"
# Filter to specific test type subdirectory
test-type = [
"unit",
"e2e"
]