-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (177 loc) · 4.71 KB
/
pyproject.toml
File metadata and controls
201 lines (177 loc) · 4.71 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
[project]
name = "claude-code-toolbox"
version = "4.12.0"
description = "Claude Code Toolbox — automated installers and environment configuration framework for Claude Code with one-line setup across Windows, macOS, and Linux."
readme = "README.md"
authors = [{ name = "Aleksandr Filippov", email = "alexfeel@protonmail.com" }]
requires-python = ">=3.12,<3.13"
dependencies = [
"pyyaml>=6.0.2",
"pydantic>=2.10.3",
]
[dependency-groups]
dev = [
"pre-commit>=4.0.1",
"pytest>=8.3.5",
"pytest-asyncio>=0.25.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-timeout>=2.3.1",
"mypy>=1.13.0",
"pyright>=1.1.390",
"types-PyYAML>=6.0.12",
]
[tool.ruff]
# Enable preview features
preview = true
# General settings
src = ["scripts"]
target-version = "py312"
line-length = 127
extend-include = ["tests/**/*.py"]
[tool.ruff.lint]
# Ignore specific rules
ignore = ["B008", "PIE807"] # B008: lambda in default_factory, PIE807: Prefer list over lambda
# Enable rule groups
select = [
"FAST", # FastAPI
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"B", # flake8-bugbear
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EXE", # flake8-executable
"FIX", # flake8-fix-me
"FA", # flake8-future-annotations
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"TID", # flake8-tidy-imports
# "TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"FLY", # flynt
"I", # isort
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"N", # pep8-naming
"PERF", # Perflint
"E", "W", # pycodestyle
"DOC", # pydoclint
"F", # Pyflakes
"PGH", # pygrep-hooks
"UP", # pyupgrade
"FURB", # refurb
]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
ignore-fully-untyped = true
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "single"
multiline-quotes = "single"
[tool.ruff.lint.flake8-type-checking]
quote-annotations = true
strict = false
[tool.ruff.lint.isort]
known-first-party = ["scripts"]
force-single-line = true
[tool.ruff.lint.pydoclint]
ignore-one-line-docstrings = true
[tool.mypy]
# Core safety, balanced for production
python_version = '3.12'
files = ['scripts']
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_calls = true
check_untyped_defs = true
disallow_any_generics = true
disallow_any_explicit = false
disallow_any_unimported = true
# None and Optional handling
no_implicit_optional = true
# Warnings that catch real bugs
warn_return_any = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_ignores = true
warn_unused_configs = true
# Cleaner public APIs and safer comparisons
implicit_reexport = false
strict_equality = true
# Error message quality
show_error_codes = true
pretty = true
# Encourage precise ignores and common correctness checks
enable_error_code = [
'ignore-without-code',
'unused-awaitable',
'possibly-undefined',
'truthy-bool',
'truthy-iterable',
'redundant-expr',
'explicit-override'
]
# Pydantic v2 plugin for better type inference on models and validators
plugins = ['pydantic.mypy']
# Skip common noise and respect .gitignore
exclude_gitignore = true
exclude = '''(?x)(
^\.venv/
| ^\.tox/
| ^\.mypy_cache/
| ^\.pytest_cache/
| ^build/
| ^dist/
| ^node_modules/
| ^site-packages/
)'''
# Silence auto-generated migrations
[[tool.mypy.overrides]]
module = ['migrations.*']
ignore_errors = true
[tool.pyright]
include = ["scripts"]
exclude = [".venv", "**/__pycache__"]
# Set a sane global baseline; strictness is then scoped below.
typeCheckingMode = "standard"
# Let Ruff handle these:
reportUnusedImport = "none"
reportUnusedVariable = "none"
reportUnnecessaryTypeIgnoreComment = "none"
# Make dirs strict
strict = ["scripts"]
[tool.pytest.ini_options]
asyncio_mode = "strict"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
norecursedirs = ["scripts"]
filterwarnings = [
"ignore:coroutine 'AsyncMockMixin._execute_mock_call' was never awaited:RuntimeWarning",
]
[tool.coverage.run]
relative_files = true
source = ["scripts"]
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"pass",
"except ImportError:",
]