-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
107 lines (99 loc) · 2.61 KB
/
pyproject.toml
File metadata and controls
107 lines (99 loc) · 2.61 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
[project]
name = "nanapi"
version = "0.1.0"
description = "FastAPI + Gel backend for Nana-chan"
readme = "README.md"
license = "MIT"
authors = [
{ name = "NextFire", email = "git@yuru.moe" },
{ name = "odrling", email = "florianbadie@odrling.xyz" },
{ name = "Pierre Jeanjean", email = "rhiobet@gmail.com" },
]
requires-python = ">=3.12"
dependencies = [
"gel==3.1.0",
"fastapi==0.136.1",
"pydantic==2.13.3",
"aiohttp[speedups]==3.13.5",
# https://github.com/PyYoshi/cChardet/issues/81
"faust-cchardet==2.1.19",
"orjson==3.11.8",
"backoff==2.2.1",
"meilisearch-python-sdk==7.1.3",
"numpy==2.4.4",
"pillow==12.2.0",
"rich==15.0.0",
"discord-webhook[async]==1.4.1",
"python-multipart==0.0.26",
"bcrypt==5.0.0",
"cachetools==5.5.2",
"asyncache==0.3.1",
"hypercorn==0.18.0",
"tzdata==2026.1",
"pyjwt==2.12.1",
"icalendar==7.0.3",
"yarl==1.23.0",
"starlette==1.0.0",
"tiktoken==0.12.0",
"tqdm==4.67.3",
]
[dependency-groups]
dev = [
"pyright==1.1.409",
"ruff==0.15.11",
"uvicorn==0.46.0",
"gel-pydantic-codegen==1.2.0",
"pyinstrument==5.1.2",
"fawltydeps==0.20.0",
]
[project.urls]
homepage = "https://github.com/Japan7/nanapi"
[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"
reportMissingTypeStubs = false
[tool.ruff]
line-length = 99
[tool.ruff.lint]
select = ["E", "F", "W", "B", "SIM", "I"]
ignore = [
# lambda expressions
"E731",
# ambiguous variable name
"E741",
# Do not perform function calls in argument defaults
"B008",
# Within an except clause, raise exceptions with `raise ... from err` or `raise ... from None`
"B904",
# `zip()` without an explicit `strict=` parameter
"B905",
# Use `contextlib.suppress(asyncio.CancelledError)` instead of try-except-pass
"SIM105",
# Use ternary operator `{contents}` instead of if-else-block
"SIM108",
]
[tool.ruff.lint.per-file-ignores]
"nanapi/database/*" = ["E501"]
"nanapi/*local_settings.py" = ["E501"]
[tool.ruff.format]
quote-style = "single"
[tool.fawltydeps]
ignore_unused = [
# cchardet is used by aiohttp
"faust-cchardet",
# tzdata provides timezones when the OS/distribution doesn’t
"tzdata",
# dev tools
"gel-pydantic-codegen",
"fawltydeps",
"ruff",
"pyright",
# for vscode debug (hypercorn --reload is not working)
"uvicorn",
# we have 1st party utils modules with the same name
# https://github.com/tweag/FawltyDeps/issues/419
"fastapi",
# fastapi needs it for multipart uploads
"python-multipart",
]
output_format = "human_detailed"