-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
106 lines (93 loc) · 2.82 KB
/
pyproject.toml
File metadata and controls
106 lines (93 loc) · 2.82 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
[project]
name = "naagin"
version = "0.3.0"
description = "A server implementation for a certain swimsuit gacha game."
requires-python = ">=3.13"
dependencies = [
"anyio",
"asyncstdlib",
"filelock",
"cryptography",
"rich",
"pydantic",
"pydantic-settings",
"sqlparse",
"asyncpg",
"sqlalchemy",
"httpx",
"starlette",
"orjson",
"fastapi[standard]",
]
[dependency-groups]
dev = [
"ruff"
]
dump = [
"frozendict",
"genson",
"datamodel-code-generator"
]
proxy = [
"mitmproxy"
]
[tool.uv]
package = false
default-groups = "all"
override-dependencies = [
"httptools; sys_platform == 'never'"
]
[tool.ruff]
src = ["naagin"]
line-length = 120
[tool.ruff.format]
skip-magic-trailing-comma = true
[tool.ruff.lint]
preview = true
explicit-preview-rules = true
select = ["ALL"]
extend-select = [
"PLC0415", # Pylint import-outside-top-level
]
ignore = [
"A", # flake8-builtins *
"COM812", # flake8-commas missing-trailing-comma
"D1", # pydocstyle undocumented-*
"D203", # pydocstyle incorrect-blank-line-before-class
"D212", # pydocstyle multi-line-summary-first-line
"E501", # pycodestyle line-too-long
"ERA001", # eradicate commented-out-code
"PLC0414", # Convention useless-import-alias
]
extend-safe-fixes = [
"F401", # Pyflakes unused-import
]
extend-unsafe-fixes = [
"RET505", # flake8-return superfluous-else-return
]
[tool.ruff.lint.per-file-ignores]
"naagin/imports.py" = [
"TID251", # flake8-tidy-imports banned-api
]
"naagin/middlewares/**.py" = [
"TID251", # flake8-tidy-imports banned-api
]
[tool.ruff.lint.flake8-boolean-trap]
extend-allowed-calls = ["fastapi.datastructures.Default"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["fastapi.Depends", "fastapi.datastructures.Default"]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"pathlib.Path".msg = "Use anyio.Path instead."
"httpx.Client".msg = "Use httpx.AsyncClient instead."
"starlette.datastructures.Headers".msg = "Use fastapi.datastructures.Headers instead."
"starlette.exceptions.HTTPException".msg = "Use fastapi.exceptions.StarletteHTTPException instead."
"starlette.middleware.Middleware".msg = "Use fastapi.middleware.Middleware instead."
"starlette.requests.Request".msg = "Use fastapi.Request instead."
"starlette.responses.Response".msg = "Use fastapi.Response instead."
"pydantic.BaseModel".msg = "Use naagin.bases.ModelBase instead."
"pydantic_settings.BaseSettings".msg = "Use naagin.bases.SettingsBase instead."
"sqlalchemy.ext.asyncio.AsyncSession".msg = "Use naagin.classes.AsyncSession instead."
"sqlalchemy.orm.DeclarativeBase".msg = "Use naagin.bases.SchemaBase instead."
"naagin.decorators.async_req_cache".msg = "Do not use naagin.decorators.async_req_cache."
[tool.ruff.lint.isort]
force-single-line = true