-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathpyproject.toml
More file actions
159 lines (146 loc) · 4.88 KB
/
pyproject.toml
File metadata and controls
159 lines (146 loc) · 4.88 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
[project]
name = "overfast-api"
version = "4.4.1"
description = "Overwatch API giving data about heroes, maps, and players statistics."
license = {file = "LICENSE"}
authors = [
{name = "Valentin PORCHET", email = "valentin.porchet@proton.me"}
]
readme = "README.md"
requires-python = ">=3.14"
dependencies = [
"asyncpg==0.31.*",
"fastapi[standard-no-fastapi-cloud-cli]==0.136.*",
"httpx[http2]==0.28.*",
"loguru==0.7.*",
"prometheus-client==0.25.*",
"pydantic==2.13.*",
"pydantic-settings==2.14.*",
"selectolax==0.4.*",
"sentry-sdk[fastapi]==2.58.*",
"taskiq==0.12.*",
"taskiq-fastapi==0.5.*",
"valkey[libvalkey]==6.1.*",
]
[project.urls]
Homepage = "https://overfast-api.tekrop.fr"
Documentation = "https://overfast-api.tekrop.fr"
Repository = "https://github.com/TeKrop/overfast-api"
Issues = "https://github.com/TeKrop/overfast-api/issues"
[dependency-groups]
dev = [
"fakeredis[valkey]==2.35.*",
"ipdb==0.13.*",
"pytest==9.0.*",
"pytest-asyncio==1.3.*",
"pytest-cov==7.1.*",
"pytest-randomly==4.1.*",
"pytest-xdist==3.8.*",
"ruff==0.15.*",
"pre-commit==4.6.*",
"pyinstrument==5.1.*",
"memray==1.19.*",
"objgraph==3.6.*",
"ty==0.0.*",
]
[tool.uv]
compile-bytecode = true
[tool.ruff]
# Check app code and tests
src = ["app", "tests"]
# Assume Python 3.14
target-version = "py314"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"C90", # mccabe complexity checker
"I001", # isort
"N", # pep8-naming
"UP", # pyupgrade
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"EM", # flake8-errmsg
"EXE", # flake8-executable
"FIX", # flake8-fixme
"FA", # flake8-future-annotations
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate commented-out code
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"FLY", # flynt
"FAST", # FastAPI rules
"PERF", # perflint
"FURB", # refurb
"RUF", # ruff-specific rules
]
ignore = [
# General rules to ignore
"B008", # do not perform function calls in argument defaults
"S101", # using "assert" is not a security issue
"S113", # using default timeout of httpx without specifying it
"S311", # there is no cryptographic usage of random here
"RET505", # allow using else after return statement
"PLE1205", # error checking doesn't support {} format
"PLR0913", # allow 6/7 arguments for some functions
"TID252", # allow relative imports from parents
"FAST003", # false positive on router parameters
# Rules already handled by ruff formatter
"E501", # line too long
"COM812", # missing trailing comma
"COM819", # prohibited trailing comma
"ISC001", # single line implicit string concatenation
"Q000", # bad quotes in inline string
"Q001", # bad quotes in multiline string
"Q002", # bad quotes in docstring
"Q003", # avoidable escape quote
"W191" # tab indentation detected instead of spaces
]
# Allow some confusable UTF8 chars (used in regexp)
allowed-confusables = ["(", ")", ":"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["SLF001"] # Ignore private member access in tests
"app/api/models/**" = ["TC001"] # Ignore type-checking block (Pydantic models definition)
"app/api/routers/**" = ["TC001"] # Enums used in FastAPI path/query parameters need runtime import
"app/api/dependencies.py" = ["TC001"] # Port types needed at runtime for FastAPI Depends
"app/domain/services/**" = ["TC001"] # Locale/enums used in runtime method annotations
[tool.ruff.lint.isort]
# Consider app as first-party for imports in tests
known-first-party = ["app"]
[tool.semantic_release]
commit_parser = "conventional"
commit_message = "v{version}\n\nAutomatically generated by python-semantic-release"
tag_format = "v{version}"
version_toml = ["pyproject.toml:project.version"]
[tool.semantic_release.commit_parser_options]
parse_squash_commits = false
[tool.semantic_release.publish]
upload_to_vcs_release = false