-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
120 lines (108 loc) · 3.01 KB
/
pyproject.toml
File metadata and controls
120 lines (108 loc) · 3.01 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
[project]
name = "fastapi-app-template"
version = "0.3.0"
description = "Template for FastAPI project"
readme = "README.md"
requires-python = ">=3.12.7"
dependencies = [
"alembic>=1.14.0",
"asyncpg>=0.30.0",
"fastapi[standard]>=0.115.5",
"google-auth>=2.36.0",
"httpx>=0.27.2",
"orjson>=3.10.18",
"passlib>=1.7.4",
"pydantic-settings>=2.6.1",
"pyjwt>=2.10.0",
"pytz>=2024.2",
"requests>=2.32.3",
"sqlalchemy[asyncio]>=2.0.36",
"uvicorn>=0.32.1",
]
[dependency-groups]
dev = [
"mypy>=1.13.0",
"pre-commit>=4.0.1",
"pytest-asyncio>=0.24.0",
"pytest>=8.3.4",
"ruff>=0.8.0",
"pytest-env>=1.1.5",
]
[tool.pytest.ini_options]
asyncio_mode="auto"
asyncio_default_fixture_loop_scope = "session"
env = [
"ENV_STATE=test",
]
[tool.mypy]
strict = true
ignore_missing_imports = true
allow_subclassing_any = true
allow_untyped_calls = true
pretty = true
show_error_codes = true
implicit_reexport = true
allow_untyped_decorators = true
warn_unused_ignores = false
warn_return_any = false
namespace_packages = true
exclude = ["venv", ".venv", "alembic"]
[tool.ruff]
target-version = "py312"
exclude = ["alembic"]
line-length = 88
[tool.ruff.lint]
select = [
"E", # Error
"F", # Pyflakes
"W", # Pycodestyle
"C90", # McCabe complexity
"I", # Isort
"N", # pep8-naming
# "D", # Pydocstyle
"ANN", # Pytype annotations
"S", # Bandit
"B", # Bugbear
# "COM", # Commas
"C4", # Comprehensions
# "ISC", # Implicit string concat
"PIE", # Unnecessary code
"T20", # Catch prints
"PYI", # validate pyi files
"Q", # Checks for quotes
"RSE", # Checks raise statements
"RET", # Checks return statements
"SLF", # Self checks
"SIM", # Simplificator
"PTH", # Pathlib checks
"ERA", # Checks for commented out code
"PL", # PyLint checks
"RUF", # Specific to Ruff checks
]
ignore = [
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"B008", # Do not perform function calls in argument defaults
"D211", # No blank lines allowed before class docstring
"D212", # Multi-line docstring summary should start at the first line
"D401", # First line should be in imperative mood
"D104", # Missing docstring in public package
"D100", # Missing docstring in public module
"D202", # No blank lines allowed after function docstring
"ANN401", # typing.Any are disallowed in `**kwargs
"PLR0913", # Too many arguments for function call
"D106", # Missing docstring in public nested class
]
mccabe = { max-complexity = 10 }
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Use of assert detected
]
[tool.ruff.lint.pydocstyle]
convention = "pep257"
ignore-decorators = ["typing.overload"]
[tool.ruff.lint.pylint]
allow-magic-value-types = ["int", "str", "float", "bytes"]