-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
99 lines (88 loc) · 2.92 KB
/
pyproject.toml
File metadata and controls
99 lines (88 loc) · 2.92 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
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.backends.legacy:build"
[project]
name = "auto-run-task"
version = "3.0.0"
description = "Project-based AI agent task execution engine"
requires-python = ">=3.11"
dependencies = ["rich>=13.0.0"]
[project.optional-dependencies]
dev = [
"ruff>=0.9.0",
"mypy>=1.11.0",
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
"pre-commit>=3.8.0",
]
# ─── Ruff ─────────────────────────────────────────────────────────
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["task_runner"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line-too-long (handled by formatter)
"SIM108", # ternary operator (sometimes hurts readability)
"RUF001", # ambiguous Unicode chars — intentional (Chinese descriptions)
"TC001", # runtime imports used as actual values, not type-only
"TC002", # same as above for third-party
]
[tool.ruff.lint.isort]
known-first-party = ["task_runner"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
# ─── Mypy ─────────────────────────────────────────────────────────
[tool.mypy]
python_version = "3.11"
strict = false
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_redundant_casts = true
no_implicit_optional = true
check_untyped_defs = true
disallow_untyped_defs = false # gradual – tighten over time
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "task_runner.*"
disallow_untyped_defs = false
# ─── Pytest ───────────────────────────────────────────────────────
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = [
"-v",
"--tb=short",
"--cov=task_runner",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml:coverage.xml",
]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# ─── Coverage ─────────────────────────────────────────────────────
[tool.coverage.run]
source = ["task_runner"]
omit = ["task_runner/__pycache__/*", "tests/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"\\.\\.\\.",
]