forked from TeKrop/overfast-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
154 lines (141 loc) · 4.64 KB
/
Copy pathpyproject.toml
File metadata and controls
154 lines (141 loc) · 4.64 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
[project]
name = "overfast-api"
version = "1.0.0"
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 = [
"fastapi[standard-no-fastapi-cloud-cli]==0.123.*",
"httpx[http2]==0.28.*",
"loguru==0.7.*",
"valkey[libvalkey]==6.1.*",
"pydantic==2.12.*",
"pydantic-settings==2.12.*",
"selectolax==0.4.*",
]
[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.32.*",
"ipdb==0.13.*",
"pytest==9.0.*",
"pytest-asyncio==1.3.*",
"pytest-cov==7.0.*",
"pytest-randomly==4.0.*",
"pytest-xdist==3.8.*",
"ruff==0.14.*",
"pre-commit==4.5.*",
"pyinstrument==5.1.*",
"memray==1.19.*",
"objgraph==3.6.*",
]
[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 on tests
"router.py" = ["TC001"] # Ignore type-checking block (FastAPI routes definition)
"models.py" = ["TC001"] # Ignore type-checking block (Pydantic models definition)
[tool.ruff.lint.isort]
# Consider app as first-party for imports in tests
known-first-party = ["app"]
[tool.pytest.ini_options]
# Put this default value to prevent warnings
asyncio_default_fixture_loop_scope = "function"
[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