-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathpyproject.toml
82 lines (70 loc) · 2.48 KB
/
pyproject.toml
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
################################################################################
# Tool Configuration
################################################################################
[tool.pytest.ini_options]
testpaths = ["tests"]
markers = [
"docs: Tests relating to generated documentation!",
"installs: Tests that install packages, e.g. from executing hatch env scripts",
]
[tool.ruff]
line-length = 88
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"D107", # 'Missing docstring in __init__' ignored because pydoclint wants us to document the class instead.
"D203", # '1 blank line required before class docstring' ignored because we want no blank line.
"D212", # 'Multi-line docstring summary should start at the first line' ignored because we want the summary to start on the second line.
"D407", # 'Missing dashed underline after section' ignored because Google style docstrings don't underline.
"ANN002", # 'Missing type annotation for {*args} in method'.
"ANN003", # 'Missing type annotation for {*kwargs} in method'.
"ANN101", # 'Missing type annotation for {self} in method'.
"ANN102", # 'Missing type annotation for {cls} in classmethod'.
]
[tool.ruff.lint.extend-per-file-ignores]
"tests/**/*.py" = [
"A001",
"A002",
"S101", # 'Use of assert detected' ignored because we are using pytest.
"INP001", # 'Insecure input' ignored because we are testing.
"ANN201", # 'Missing type annotation for {return}' ignored because all tests return `None`.
"S602",
"S603",
"S607",
]
[tool.ruff.lint.isort]
case-sensitive = true
lines-after-imports = 1
################################################################################
# Hatch Environments
################################################################################
[tool.hatch.envs.default]
skip-install = true
[tool.hatch.envs.dev]
description = """
Describe the environment for local development.
"""
dependencies = [
"copier ~=9.3",
]
path = ".venv"
[tool.hatch.envs.test]
description = """
Test the instantiation of the template.
"""
dependencies = [
"copier ~=9.3",
"GitPython ~=3.1",
"hatch ~=1.12",
"pytest ~=8.3",
"pytest-xdist ~=3.6",
"pre-commit",
"ruamel.yaml>=0.18.0",
"validate-pyproject >=0.22",
"trove-classifiers>=2021.10.20",
"tomli >=2.0.2; python_version<'3.11'",
]
[[tool.hatch.envs.test.matrix]]
python = ["3.10", "3.11", "3.12", "3.13"]
[tool.hatch.envs.test.scripts]
run = "pytest {args:--numprocesses=auto}"