-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
192 lines (168 loc) · 5.28 KB
/
pyproject.toml
File metadata and controls
192 lines (168 loc) · 5.28 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
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "milo-cli"
version = "0.2.2"
description = "Template-driven CLI applications for free-threaded Python"
readme = "README.md"
requires-python = ">=3.14"
license = "MIT"
dependencies = ["kida-templates>=0.6.0"]
keywords = ["cli", "terminal", "forms", "free-threading", "template", "elm"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Terminals",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[project.scripts]
milo = "milo.cli:main"
[project.optional-dependencies]
docs = ["bengal>=0.2.6"]
yaml = ["pyyaml>=6.0"]
watch = ["watchfiles>=1.0"]
[project.urls]
Homepage = "https://lbliii.github.io/milo-cli/"
Documentation = "https://lbliii.github.io/milo-cli/"
Repository = "https://github.com/lbliii/milo-cli"
Changelog = "https://github.com/lbliii/milo-cli/blob/main/CHANGELOG.md"
Issues = "https://github.com/lbliii/milo-cli/issues"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
milo = ["templates/*.kida", "templates/components/*.kida", "py.typed"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src", "tests"]
timeout = 120
markers = [
"slow: tests that are intentionally slow",
]
[tool.coverage.run]
source = ["milo"]
branch = true
[tool.coverage.report]
show_missing = true
skip_covered = true
precision = 1
fail_under = 80
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@overload",
]
[tool.ty.environment]
python-version = "3.14"
[tool.ty.rules]
call-non-callable = "error"
unresolved-attribute = "warn"
unresolved-import = "error"
invalid-argument-type = "error"
possibly-unresolved-reference = "warn"
invalid-return-type = "error"
invalid-assignment = "error"
[[tool.ty.overrides]]
include = ["src/milo/dev.py"]
[tool.ty.overrides.rules]
unresolved-import = "warn"
[tool.ruff]
line-length = 100
target-version = "py314"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes (unused imports, variables, etc.)
"UP", # pyupgrade - Python modernization
"B", # flake8-bugbear - common bugs
"SIM", # flake8-simplify - simplify code
"I", # isort - import sorting
"N", # pep8-naming
"PIE", # misc lints (unnecessary pass, duplicate dict keys, etc.)
"PERF", # perflint - performance anti-patterns
"C4", # unnecessary comprehensions/list()/dict() calls
"RUF", # Ruff-specific (unused noqa, mutable class defaults, etc.)
"PT", # pytest style
"A", # flake8-builtins - shadowing builtins
"S", # bandit - security checks
"ARG", # flake8-unused-arguments
"T20", # flake8-print - no print() in library code
"ERA", # eradicate - no commented-out code
"RSE", # flake8-raise - clean raise statements
"FA", # flake8-future-annotations
"TCH", # flake8-type-checking - optimize type imports
"TID", # flake8-tidy-imports
]
ignore = [
"E501", # line length handled by formatter
"A003", # class attribute shadowing builtin (format, type on dataclasses is fine)
"TCH", # Python 3.14 has lazy annotations (PEP 649/749); TYPE_CHECKING blocks unnecessary
"ERA001", # section-header comments trigger false positives
"S603", # subprocess calls are expected in a CLI framework
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/**/*.py" = ["S101", "S108", "S110", "S604", "SIM117", "N806", "ARG", "T201"]
"src/milo/_child.py" = ["S101"] # asserts for type narrowing on subprocess pipes
"src/milo/testing/*.py" = ["S101", "ARG"] # test helpers use assert and may have unused args
"src/milo/version_check.py" = ["S110", "S310"] # best-effort cache reads + known PyPI URL
"src/milo/mcp.py" = ["ARG002"] # MCP protocol methods require params signature
"src/milo/gateway.py" = ["ARG002", "S110"] # MCP protocol methods + best-effort discovery
"benchmarks/**/*.py" = ["T201", "ARG", "S101"] # benchmarks: print, unused args, assert
[tool.towncrier]
directory = "changelog.d"
filename = "CHANGELOG.md"
package = "milo"
package_dir = "src"
title_format = "## {version} — {project_date}"
issue_format = "[#{issue}](https://github.com/lbliii/milo-cli/issues/{issue})"
underlines = ["", "", ""]
[[tool.towncrier.type]]
directory = "added"
name = "Added"
showcontent = true
[[tool.towncrier.type]]
directory = "changed"
name = "Changed"
showcontent = true
[[tool.towncrier.type]]
directory = "deprecated"
name = "Deprecated"
showcontent = true
[[tool.towncrier.type]]
directory = "removed"
name = "Removed"
showcontent = true
[[tool.towncrier.type]]
directory = "fixed"
name = "Fixed"
showcontent = true
[[tool.towncrier.type]]
directory = "security"
name = "Security"
showcontent = true
[dependency-groups]
dev = [
# Testing
"pytest>=8.0",
"pytest-cov>=4.0",
"pytest-xdist>=3.3.0",
"pytest-timeout>=2.3.0",
"pytest-benchmark>=4.0.0",
"hypothesis>=6.100.0",
# Linting & Type Checking
"ty>=0.0.11",
"ruff>=0.15.1",
# Pre-commit
"pre-commit>=4.0.0",
# Changelog
"towncrier>=24.0",
]
docs = [
"bengal>=0.2.6",
]