-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
120 lines (99 loc) · 2.86 KB
/
pyproject.toml
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
[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry_dynamic_versioning.backend"
[tool.poetry]
name = "deadnews-template-python"
version = "0.0.0"
description = "Python Project Template"
authors = ["DeadNews <[email protected]>"]
license = "MIT"
readme = "README.md"
homepage = "https://github.com/deadnews/deadnews-template-python"
repository = "https://github.com/deadnews/deadnews-template-python"
documentation = "https://deadnews.github.io/deadnews-template-python"
keywords = ["python", "template", "layout"]
classifiers = ["Operating System :: OS Independent"]
[tool.poetry.scripts]
deadnews-template-python = "deadnews_template_python.__main__:main"
[tool.poetry.dependencies]
python = "^3.10"
fastapi = "^0.110.0"
pydantic = "^2.5.3"
uvicorn = { version = "^0.30.0", extras = ["standard"] }
[tool.poetry.group.lint.dependencies]
mypy = "^1.10.1"
poethepoet = "^0.27.0"
pyright = "^1.1.369"
ruff = "^0.5.0"
[tool.poetry.group.test.dependencies]
pytest = "^8.2.2"
pytest-cov = "^5.0.0"
httpx = "^0.27.0"
[tool.poetry.group.docs.dependencies]
mkdocs = "^1.6.0"
mkdocs-gen-files = "^0.5.0"
mkdocs-literate-nav = "^0.6.1"
mkdocs-material = "^9.5.27"
mkdocs-swagger-ui-tag = "^0.6.10"
mkdocstrings = "^0.25.1"
mkdocstrings-python = "^1.10.5"
[tool.poetry-dynamic-versioning]
enable = true
vcs = "git"
style = "semver"
[tool.poe.tasks]
mypy = "mypy ."
pyright = "pyright ."
ruff = "ruff check ."
ruff-fmt = "ruff format ."
lint.sequence = ["ruff", "ruff-fmt", "mypy", "pyright"]
[tool.poe.tasks.test]
cmd = "pytest --cov-report=xml"
[tool.pytest.ini_options]
addopts = "--verbose --cov=./src --cov-report=term"
testpaths = ["tests"]
markers = ["online"]
[tool.coverage.report]
exclude_lines = [
"# pragma: no cover",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.mypy]
disallow_untyped_defs = true
follow_imports = "normal"
ignore_missing_imports = true
show_column_numbers = true
show_error_codes = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false
[tool.pyright]
include = ["src"]
ignore = ["tests"]
typeCheckingMode = "standard"
[tool.ruff]
line-length = 99
target-version = "py310" # Until Poetry v2
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"COM812", # Trailing comma missing
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"ISC001", # Checks for implicitly concatenated strings on a single line
"PLR0913", # Too many arguments to function call
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = ["ANN", "D", "E501", "PLC1901", "PLR2004", "S"]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.pycodestyle]
max-doc-length = 129
max-line-length = 129
[tool.ruff.lint.pydocstyle]
convention = "google"