-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (103 loc) · 3.12 KB
/
pyproject.toml
File metadata and controls
118 lines (103 loc) · 3.12 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
[project]
name = "cmd-mox"
version = "0.2.0"
description = "Python-native command mocking for pytest, replacing shell-based command tests with fast socket-backed shims"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "ISC" }
authors = [{ name = "Payton McIntosh", email = "pmcintosh@df12.net" }]
dependencies = [
"pywin32>=306; platform_system == 'Windows'",
]
[project.urls]
Homepage = "https://df12.studio/docs.html"
Repository = "https://github.com/leynos/cmd-mox"
[dependency-groups]
dev = [
"pytest",
"pytest-xdist",
"ruff",
"ty",
"pytest-timeout",
"pytest-bdd",
"parse_type",
]
[tool.ruff]
line-length = 88
target-version = "py312"
[tool.ruff.lint]
select = [
"F", # Pyflakes rules
"W", # PyCodeStyle warnings
"E", # PyCodeStyle errors
"I", # Sort imports properly
"UP", # Warn if certain things can changed due to newer Python versions
"C4", # Catch incorrect use of comprehensions, dict, list, etc
"FA", # Enforce from __future__ import annotations
"ISC", # Good use of string concatenation
"ICN", # Use common import conventions
"RET", # Good return practices
"SIM", # Common simplification rules
"TID", # Some good import practices
"TC", # Enforce importing certain types in a TYPE_CHECKING block
"PTH", # Use pathlib instead of os.path
"TD", # Be diligent with TODO comments
"A", # detect shadowed builtins
"BLE", # disallow catch-all exceptions
"S", # disallow things like "exec"; also restricts "assert" but I just NOQA it when I really need it
"DTZ", # require strict timezone manipulation with datetime
"FBT", # detect boolean traps
"N", # enforce naming conventions, e.g. ClassName vs function_name
"FURB",
"B",
"RUF",
"LOG",
"Q",
"PT",
"RSE",
"PERF",
"TRY",
"D",
"ANN",
"C90", # Enforce cyclomatic complexity limits
"PLR0913", # Restrict the number of function arguments
]
extend-ignore = [
"D203", # Conflicts with D211; prefer enforcing no blank line before class docstring.
"D213", # Conflicts with D212; keep summary on the first line.
]
[tool.ruff.lint.per-file-ignores]
"**/test_*.py" = ["S101", "PLR0913", "PLR2004"]
"tests/steps/*.py" = ["S101", "PLR0913", "PLR2004"]
[tool.ruff.lint.mccabe]
max-complexity = 9
[tool.ruff.lint.pylint]
max-args = 4
[tool.ruff.lint.flake8-import-conventions]
# Declare the banned `from` imports.
banned-from = [
"typing",
"datetime",
"collections.abc",
"dataclasses",
"enum",
"msgspec",
]
[tool.ruff.lint.flake8-import-conventions.aliases]
datetime = "dt"
dataclasses = "dc"
"collections.abc" = "cabc"
"msgspec.json" = "msgspec_json"
[tool.ruff.lint.pydocstyle]
# Enforce NumPy docstring style
convention = "numpy"
[tool.pytest.ini_options]
# Tests automatically killed after seconds elapsed
timeout = 30
[tool.uv]
package = true
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
exclude = ["features"]