-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (94 loc) · 2.9 KB
/
pyproject.toml
File metadata and controls
107 lines (94 loc) · 2.9 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
[project]
name = "python-base-uv"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "idatsy", email = "stefan@ranvier.co.uk" }
]
requires-python = ">=3.13"
dependencies = [
"loguru",
]
[project.scripts]
python-base-uv = "python_base_uv:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
default-groups = ["dev"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
[dependency-groups]
dev = [
"pyrefly",
"pyright",
"pytest",
"pytest-asyncio",
"pytest-watcher",
"ruff",
]
[tool.ruff]
line-length = 125
target-version = "py313"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN204", # Missing return type for __init__
"COM812", # Missing trailing comma (conflicts with formatter)
"D100", "D101", "D102", "D103", "D104", "D105", "D107", # Docstrings optional
"D401", # First line imperative mood
"E501", # Line too long (handled by formatter)
"ISC001", # Conflicts with formatter
"PLR0913", # Too many arguments (sometimes necessary)
"S104", # Binding to all interfaces
"S608", # SQL injection (false positives with ORMs)
"W291", # Trailing whitespace
]
fixable = ["ALL"]
pydocstyle = { convention = "google" }
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.lint.per-file-ignores]
"**/wip*.py" = ["ALL"]
"**/tests/*" = ["D", "ANN", "S", "ERA", "INP001", "PLR2004", "SLF001", "ARG", "FBT", "PT011", "PGH004", "T201"]
"*_" = ["D", "ANN", "S"]
"wip*" = ["D", "ANN", "S"]
"__init__.py" = ["D"]
"__main__.py" = ["T201"] # Allow print in main entry point
"**/gen/*" = ["ALL"]
"**/*.ipynb" = ["ALL"]
[tool.ruff.lint.isort]
force-single-line = false
lines-between-types = 1
known-first-party = []
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = false
suppress-none-returning = true
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 125
[tool.pyright]
include = ["src"]
exclude = ["**/node_modules", "**/__pycache__", ".venv", ".git", "dist", "build", "_*", "wip*", "**/tests", "**/gen", "**/program/*", "**/*.ipynb", "**/wip*.py"]
defineConstant = { DEBUG = true }
typeCheckingMode = "strict"
pythonVersion = "3.13"
pythonPlatform = "All"
# Relaxations for strict mode
reportUnknownMemberType = "warning" # Too noisy for dynamic frameworks
reportUnknownArgumentType = false # Too noisy for dynamic frameworks
reportUnusedCallResult = false # Side-effect functions
# Additional checks (explicit)
reportMissingImports = "error"
reportUnknownParameterType = "warning"
reportMissingParameterType = "warning"
reportUnnecessaryTypeIgnoreComment = "warning"
reportUnnecessaryIsInstance = "warning"
reportImportCycles = "error"
reportUnusedVariable = "warning"