forked from timurivanov21/yagit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
177 lines (161 loc) · 4.36 KB
/
pyproject.toml
File metadata and controls
177 lines (161 loc) · 4.36 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
[tool.poetry]
name = "yagit"
version = "0.1.0"
description = ""
authors = [
]
maintainers = [
]
readme = "README.md"
[tool.poetry.dependencies]
python = ">3.9.1,<4"
fastapi = "^0.115.6"
uvicorn = { version = "^0.34.0", extras = ["standard"] }
pydantic = "^2.10.4"
pydantic-settings = "^2.7.0"
yarl = "^1.18.3"
ujson = "^5.10.0"
SQLAlchemy = {version = "^2.0.36", extras = ["asyncio"]}
alembic = "^1.14.0"
asyncpg = {version = "^0.30.0", extras = ["sa"]}
redis = {version = "^5.2.1", extras = ["hiredis"]}
aiofiles = "^24.1.0"
httptools = "^0.6.4"
pymongo = "^4.10.1"
environs = "^14.1.1"
[tool.poetry.group.dev.dependencies]
pytest = "^8"
ruff = "^0.5.0"
mypy = "^1.10.1"
pre-commit = "^3.7.1"
black = "^24.4.2"
pytest-cov = "^5"
anyio = "^4"
pytest-env = "^1.1.3"
fakeredis = "^2.23.3"
httpx = "^0.27.0"
[tool.isort]
profile = "black"
multi_line_output = 3
src_paths = ["yagit",]
[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
# Remove this and add `types-redis`
# when the issue https://github.com/python/typeshed/issues/8242 is resolved.
[[tool.mypy.overrides]]
module = [
'redis.asyncio'
]
ignore_missing_imports = true
[tool.pytest.ini_options]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
"ignore:.*unclosed.*:ResourceWarning",
]
env = [
"YAGIT_ENVIRONMENT=pytest",
"YAGIT_DB_BASE=yagit_test",
]
[tool.ruff]
# List of enabled rulsets.
# See https://docs.astral.sh/ruff/rules/ for more information.
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
]
lint.ignore = [
"D101", # Missing docstring in public class
"D105", # Missing docstring in magic method
"D103", # Missing docstring in public function
"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
"ANN102", # Missing type annotation for self in method
"ANN101", # Missing type annotation for argument
"ANN201", # Missing return type annotation for public function
"ANN401", # typing.Any are disallowed in `**kwargs
"PLR0913", # Too many arguments for function call
"D106", # Missing docstring in public nested class
"RUF002", # Docstring contains ambiguous `с`
]
exclude = [
"yagit/db/migrations",
".venv/"
]
lint.mccabe = { max-complexity = 10 }
line-length = 88
[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"]
[fastapi-template.options]
project_name = "yagit"
api_type = "rest"
enable_redis = "True"
enable_rmq = "None"
ci_type = "github"
enable_migrations = "True"
enable_taskiq = "None"
enable_kube = "None"
kube_name = "yagit"
enable_routers = "True"
enable_kafka = "None"
enable_loguru = "None"
traefik_labels = "None"
add_dummy = "True"
orm = "sqlalchemy"
self_hosted_swagger = "True"
prometheus_enabled = "None"
sentry_enabled = "None"
otlp_enabled = "None"
gunicorn = "None"
add_users = "None"
cookie_auth = "None"
jwt_auth = "None"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"