-
Notifications
You must be signed in to change notification settings - Fork 14
/
pyproject.toml
125 lines (118 loc) · 3.66 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
123
124
125
[project]
name = "overfast-api"
version = "2.40.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.12"
dependencies = [
"beautifulsoup4==4.12.*",
"fastapi[standard]==0.115.*",
"httpx[http2]==0.27.*",
"loguru==0.7.*",
"lxml==5.3.*",
"redis==5.2.*",
"pydantic==2.9.*",
"pydantic-settings==2.6.*",
]
[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"
[tool.uv]
compile-bytecode = true
dev-dependencies = [
"fakeredis==2.26.*",
"ipdb==0.13.*",
"pytest==8.3.*",
"pytest-asyncio==0.24.*",
"pytest-cov==5.0.*",
"pytest-randomly==3.16.*",
"pytest-xdist==3.6.*",
"ruff==0.7.*",
"pre-commit==4.0.*",
]
[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
"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
# 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"]