/
pyproject.toml
122 lines (113 loc) · 3.54 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
[tool.poetry]
name = "overfast-api"
version = "2.28.1"
description = "Overwatch API giving data about heroes, maps, and players statistics."
license = "MIT"
authors = ["Valentin PORCHET <valentin.porchet@proton.me>"]
readme = "README.md"
homepage = "https://overfast-api.tekrop.fr/"
repository = "https://github.com/TeKrop/overfast-api"
documentation = "https://overfast-api.tekrop.fr/"
package-mode = false
[tool.poetry.dependencies]
python = "^3.12"
beautifulsoup4 = "^4.12.3"
fastapi = "^0.111.0"
httpx = {extras = ["http2"], version = "^0.27.0"}
loguru = "^0.7.2"
lxml = "^5.2.2"
redis = "^5.0.4"
pydantic = "^2.7.1"
pydantic-settings = "^2.2.1"
[tool.poetry.group.dev.dependencies]
fakeredis = "^2.23.1"
ipdb = "^0.13.13"
pytest = "^8.2.0"
pytest-asyncio = "^0.23.6"
pytest-cov = "^5.0.0"
pytest-randomly = "^3.15.0"
pytest-xdist = "^3.6.1"
ruff = "^0.4.4"
pre-commit = "^3.7.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.ruff]
# Check app code and tests
src = ["app", "tests"]
# Assume Python 3.12
target-version = "py312"
[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
"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
"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
"TD", # flake8-todos
"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
"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
"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
# 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.isort]
# Consider app as first-party for imports in tests
known-first-party = ["app"]