This repository was archived by the owner on Sep 24, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (111 loc) · 2.83 KB
/
pyproject.toml
File metadata and controls
124 lines (111 loc) · 2.83 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
[project]
dependencies = []
description = "Add your description here"
name = "uv-python-workflow"
readme = "README.md"
requires-python = ">=3.12"
version = "0.3.0"
[dependency-groups]
dev = [
"commitizen>=4.9.1",
"pre-commit>=4.3.0",
"pyright[nodejs]>=1.1.405",
"pytest>=8.4.2",
"pytest-cov>=7.0.0",
"pytest-sugar>=1.1.1",
"ruff>=0.13.1",
]
[tool.commitizen]
major_version_zero = true
name = "cz_conventional_commits"
# tag_format = "v$version"
tag_format = "$version"
update_changelog_on_bump = true
version_provider = "uv"
version_scheme = "pep440"
[tool.ruff] # https://docs.astral.sh/ruff/settings/#top-level
exclude = [".venv"]
line-length = 100
[tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint
extend-select = [
"FAST001", # fast-api-redundant-response-model
"FAST002", # fast-api-non-annotated-dependency
"D100", # missing-module-docstring
"D101", # undocumented-public-class
"D102", # missing-class-docstring
"D103", # undocumented-public-function
"D213", # multi-line-summary-second-line
"D400", # missing-trailing-period
"ERA001", # commented-out-code
]
select = [
"B", # flake8-bugbear
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"S", # bandit
"W", # pycodestyle
"UP", # pyupgrade
"C4", # flake8-comprehensions
"ANN", # flake8-annotations
"TRY", # tryceratops
"PERF", # perflint
"ASYNC", # flake8-async
]
# Globally ignore noisy rules (example)
ignore = [
"E402", # module level import not at top of file
"TRY003", # Avoid specifying long messages outside the exception class
"TRY301", # Abstract `raise` to an inner function
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Allow use of assert statements in tests
"S105", # hardcoded-password-string
"S106", # hardcoded-password-func-arg
]
[tool.ruff.format] # https://docs.astral.sh/ruff/settings/#format
quote-style = "double" # Quote style, double quotes are default
[tool.coverage.run]
branch = true
omit = [
"tests/*",
".venv/*",
]
source = ["src"]
[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self\\.debug",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
ignore_errors = true
show_missing = true
# skip_covered = true
[tool.coverage.xml]
output = "coverage.xml"
[tool.coverage.html] # pytest --cov=src --cov-report=html
directory = "coverage_html_report"
show_contexts = true
title = "Coverage Report"
[tool.pytest.ini_options]
addopts = "-ra --strict-config --strict-markers --cov=src --cov-report=xml --cov-report=term-missing"
filterwarnings = ["error"]
markers = [
"asyncio: marks tests as asyncio tests",
]
python_files = ["test_*.py"]
testpaths = ["tests"]
[tool.pyright]
exclude = [
".venv",
]
typeCheckingMode = "basic"
venv = ".venv"
venvPath = "."