-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
163 lines (134 loc) · 3.59 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
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
[project]
name = ""
version = ""
description = ""
authors = [
{ name = "UnoYakshi", email = "[email protected]" },
]
dependencies = [
"alembic>=1.10.4",
"asyncpg[sa]>=0.27.0",
"fastapi[orjson,ujson]>=0.95.1",
"pydantic[dotenv]>=1.10.7",
"uvicorn[standart]>=0.22.0",
"ujson>=5.7.0",
"orjson>=3.8.11",
"jinja2>=3.1.2",
"fastapi-users[sqlalchemy]>=11.0.0",
"sqlalchemy[asyncio,mypy]>=2.0.12",
]
requires-python = ">=3.11"
license = { text = "GNU" }
[tool.pdm]
[tool.pdm.dev-dependencies]
dev = [
"pytest>=7.3.1",
"pytest-asyncio>=0.21.0",
"httpx>=0.24.0",
"pre-commit>=3.2.2",
"black>=23.3.0",
"isort>=5.12.0",
"mypy>=1.2.0",
"sqlalchemy-stubs>=0.4",
"pep8-naming>=0.13.3",
"ruff>=0.0.264",
"safety>=2.3.4",
"coverage>=7.2.5",
]
[[tool.pdm.autoexport]]
filename = "requirements/production.txt"
without-hashes = true
groups = ["default"]
[[tool.pdm.autoexport]]
filename = "requirements/dev.txt"
without-hashes = true
groups = ["default", "dev"]
[tool.pdm.scripts]
_.env_file = ".env/import_dev.env"
[tool.black]
line-length = 120
target-version = ['py311']
single-quotes = true
skip-string-normalization = true
include = '\.pyi?$'
exclude = '''
/(
\.toml
|\.sh
|\.git
|\.ini
|Dockerfile
|Jenkinfile
)/
'''
[tool.isort]
profile = 'black'
line_length = 120
multi_line_output = 3
skip_glob = 'alembic/versions/*.py'
[tool.mypy]
python_version = 3.11
disallow_untyped_defs = true
exclude = ['pgdata/', 'scripts/', 'alembic/', 'tests/']
[tool.ruff]
# https://beta.ruff.rs/docs/rules
select = ["A", "B", "D", "E", "F", "N", "I", "S", "W", "ARG", "ANN", "COM", "C4", "ERA", "INP", "ISC", "RET", "RUF", "PIE", "PLE", "PLR", "PT", "PTH", "SIM", "SLF", "T20", "TRY"]
ignore = ["ANN101", "D202", "D212", "D401", "I001", "TRY400"]
# Allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
src = ["src"]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"alembic",
]
# Group violations by containing file.
format = "grouped"
line-length = 120
target-version = "py311"
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.ruff.flake8-annotations]
allow-star-arg-any = true
[tool.ruff.flake8-bugbear]
# Allow default arguments like, e.g., `data: List[str] = Query()` or `session: Session = Depends(get_async_session)`...
extend-immutable-calls = ["Depends", "fastapi.Depends", "fastapi.params.Depends", "Query", "fastapi.Query"]
[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["pydantic.validator", "pydantic.root_validator"]
[tool.coverage]
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self.debug",
# Don't complain about abstract methods, they aren't run:
"@(abc.)?abstractmethod"
]
[tool.coverage.html]
directory = "coverage_html_report"