-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpyproject.toml
More file actions
216 lines (194 loc) · 5.39 KB
/
Copy pathpyproject.toml
File metadata and controls
216 lines (194 loc) · 5.39 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
212
213
214
215
216
[project]
name = "taskdog-workspace"
version = "0.26.0"
description = "Taskdog monorepo workspace"
readme = "README.md"
requires-python = ">=3.12"
authors = [
{ name = "Kohei Wada" }
]
license = { text = "MIT" }
# This is a workspace root - install individual packages from packages/ directory
dependencies = []
[project.optional-dependencies]
docs = [
"mkdocs-material>=9.5",
"mkdocs-click>=0.8",
]
dev = [
"pre-commit>=4.6.1",
"ruff>=0.16.0",
"mypy>=2.3.0",
"types-python-dateutil>=2.9.0.20260716",
"pytest>=9.1.1",
"pytest-cov>=4.0.0",
]
# UV workspace configuration
[tool.uv.workspace]
members = [
"packages/taskdog-core",
"packages/taskdog-client",
"packages/taskdog-server",
"packages/taskdog-ui",
"packages/taskdog-mcp",
]
[tool.uv.sources]
taskdog-core = { workspace = true }
taskdog-client = { workspace = true }
taskdog-server = { workspace = true }
taskdog-ui = { workspace = true }
taskdog-mcp = { workspace = true }
# mypy configuration
[tool.mypy]
python_version = "3.13"
mypy_path = "packages/*/src"
# Progressive type checking - Phase 3: Moderate strictness
warn_unused_configs = true
warn_redundant_casts = true
# Disabled: SQLAlchemy attr-defined errors are environment-dependent (CI vs local)
warn_unused_ignores = false
# Phase 3: Moderate checks enabled
check_untyped_defs = true
strict_equality = true
warn_return_any = true
warn_no_return = true
# Phase 4: Full strictness enabled
disallow_untyped_defs = true # Phase 4 (enabled)
disallow_any_generics = true # Phase 4 (enabled)
disallow_untyped_calls = true # Phase 4 (enabled)
show_error_context = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
# Ignore third-party library without type stubs
[[tool.mypy.overrides]]
module = "textual.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "dateutil.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "holidays.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "sqlalchemy.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "mcp.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "alembic.*"
ignore_missing_imports = true
# Ruff configuration
[tool.ruff]
line-length = 88
target-version = "py312"
src = ["src", "tests"]
# vulture whitelist is a list of bare names for vulture, not real Python.
# force-exclude makes ruff honor this even when pre-commit passes the file explicitly.
extend-exclude = ["scripts/vulture_whitelist.py"]
force-exclude = true
[tool.ruff.lint]
select = [
"A", # flake8-builtins
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"ISC", # flake8-implicit-str-concat
"UP", # pyupgrade
"B", # flake8-bugbear
"C90", # mccabe
"N", # pep8-naming
"SIM", # simplify
"PIE", # misc lints (unnecessary pass, etc.)
"RET", # return statement simplification
"C4", # flake8-comprehensions
"PERF", # performance anti-patterns
"PTH", # flake8-use-pathlib
"FURB", # refurb modernization
"RUF", # ruff-specific rules
"TC", # flake8-type-checking
]
ignore = [
"E501", # line too long (handled by formatter)
"RET504", # unnecessary assignment before return (intentional for readability)
]
# Per-file ignores
[tool.ruff.lint.per-file-ignores]
"packages/taskdog-core/src/taskdog_core/domain/exceptions/task_exceptions.py" = [
"N818",
] # TaskNotFoundException is widely used
"packages/taskdog-core/src/taskdog_core/domain/exceptions/tag_exceptions.py" = [
"N818",
] # TagNotFoundException matches TaskNotFoundException naming convention
"packages/*/tests/**/*.py" = ["SIM115", "RUF015"] # Test code patterns are acceptable
"scripts/**/*.py" = ["B904", "C901"] # Migration scripts: exception chaining and complexity acceptable
"packages/taskdog-server/src/taskdog_server/api/error_handlers.py" = ["UP047"] # Type parameters require Python 3.12+
[tool.ruff.lint.flake8-type-checking]
runtime-evaluated-base-classes = ["pydantic.BaseModel"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.isort]
known-first-party = [
"taskdog",
"taskdog_core",
"taskdog_server",
]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
]
# Dead-code detection
[tool.vulture]
min_confidence = 60
paths = ["packages", "scripts/vulture_whitelist.py"]
exclude = ["*/migrations/*", "*/tests/*", "*/build/*", "*/.venv/*"]
# Framework-registered callables are reached dynamically, not by direct call.
ignore_decorators = [
"@router.*",
"@app.*",
"@*.tool",
"@*.command",
"@event.listens_for",
"@field_validator",
"@model_validator",
"@command_registry.register",
]
# Textual calls handlers/attributes by naming convention, not by reference.
ignore_names = [
"on_*",
"action_*",
"watch_*",
"compose",
"search_*",
"discover",
"search",
"get_suggestion",
"border_title",
"BINDINGS",
"TITLE",
"CSS_PATH",
"ENABLE_MOUSE",
"ALLOW_IN_MAXIMIZED_VIEW",
"model_config",
# Textual widget configuration attributes (set on self, read by the framework)
"cursor_type",
"zebra_stripes",
"can_focus",
"cell_padding",
"fixed_rows",
"caption",
"caption_justify",
"bubble",
]
# Build system - workspace root doesn't build directly
[build-system]
requires = ["setuptools>=83.0.0"]
build-backend = "setuptools.build_meta"
# Workspace root has no packages (prevent auto-discovery of contrib/, packages/, etc.)
[tool.setuptools]
packages = []