-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
84 lines (71 loc) · 3.03 KB
/
Copy pathpyproject.toml
File metadata and controls
84 lines (71 loc) · 3.03 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
[project]
name = "python-kickstarter"
version = "0.1.0"
description = "Copier template scaffolding a fully-gated Python project."
requires-python = ">=3.11"
license = "ISC"
authors = [{ name = "Ashlen", email = "dev@anthes.is" }]
[project.urls]
Repository = "https://github.com/maybebyte/python-kickstarter"
[tool.uv]
package = false
[dependency-groups]
dev = [
"copier>=9.6,<10",
# copier drives its _tasks through plumbum; the harness imports `plumbum.local` directly to
# scrub interpreter pins from that channel, so declare it rather than ride copier's transitive pin.
"plumbum>=1.8,<3",
"pytest>=8,<10",
"pyyaml>=6,<7",
"basedpyright>=1.39,<1.40",
"ruff>=0.15,<0.16",
"pre-commit>=4,<5",
]
[tool.pytest.ini_options]
minversion = "8.0"
testpaths = ["tests"]
pythonpath = ["."]
addopts = ["-q", "--strict-markers", "--strict-config", "--import-mode=importlib"]
[tool.basedpyright]
typeCheckingMode = "recommended" # basedpyright's default; matches what the template ships
failOnWarnings = true # declare the gate's teeth explicitly (recommended defaults
# it true, but pin it so a future mode/version drift under
# the <1.40 cap cannot silently un-fail the build)
pythonVersion = "3.11" # the requires-python floor
include = ["tests"] # the only Python surface; there is no src/
exclude = ["template", "**/__pycache__", "**/.venv"] # template/ is Jinja, never Python
reportMissingImports = "error"
[tool.ruff]
line-length = 100
target-version = "py311" # the requires-python floor (template uses the chosen python_version)
extend-exclude = ["template"] # parity with basedpyright; template/ is Jinja, count-neutral
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # formatter-owned: conflicts with `ruff format` (ruff's own formatter-compat guidance)
"ISC001", # formatter-owned: the documented companion to COM812 under `ruff format`
]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.pylint]
max-args = 8
max-branches = 12
max-returns = 6
max-statements = 50
[tool.ruff.lint.pydocstyle]
convention = "google" # selects D211/D212; resolves the D203/D213 conflicts by convention
[tool.ruff.lint.isort]
known-first-party = ["tests"] # no package — tests/ is the only first-party root
[tool.ruff.lint.per-file-ignores]
# The only Python surface is the pytest harness under tests/.
"tests/**" = [
"S101", # pytest IS assert-based (it rewrites bare asserts for introspection)
"PLR2004", # a literal threshold is the substance of a test assertion
"S603", # the harness deliberately drives git/just/uv; inputs are literal command lists
"S607", # ...invoked by name on PATH (shutil.which over REQUIRED_TOOLS); absolute paths regress portability
"D103", # test functions are self-documenting via descriptive names
"D104", # tests/ is an (empty) package marker
]
[tool.ruff.format]
quote-style = "double"
docstring-code-format = true