-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
181 lines (158 loc) · 4.47 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
[project]
name = "valorant.py"
description = "An API wrapper for Valorant API written in Python."
readme = "README.md"
requires-python = ">=3.10"
authors = [{ name = "STACiA", email = "[email protected]" }]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Development Status :: 4 - Beta",
"Typing :: Typed",
"Framework :: AsyncIO",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
]
dependencies = [
"aiohttp>=3.11.11,<4.0",
"pydantic>2.0,<3.0",
"pydantic-extra-types>=2.10.1,<3.0",
]
dynamic = ["version"]
[dependency-groups]
dev = [
"mypy>=1.14.1,<1.15",
"ruff>=0.9.3,<0.10",
"pytest>=8.3.4,<9.0",
"pytest-cov>=6.0.0,<7.0",
"coverage>=7.6.10,<8.0",
"anyio>=4.8.0,<5.0",
]
[project.optional-dependencies]
speed = ["msgspec>=0.19.0,<1.0"]
[tool.setuptools.dynamic]
version = { attr = "valorant.__version__" }
[project.urls]
homepage = "https://github.com/staciax/valorant"
repository = "https://github.com/staciax/valorant"
issues = "https://github.com/staciax/valorant/issues"
[tool.mypy]
strict = true
python_version = "3.10"
exclude = [".venv", "build"]
[[tool.mypy.overrides]]
module = "valorant.utils"
disable_error_code = ["assignment", "import-not-found"]
[tool.ruff]
line-length = 120
target-version = "py310"
exclude = [
".git",
".ruff_cache",
".mypy_cache",
".pytest_cache",
".venv",
"dist",
"build",
]
[tool.ruff.format]
preview = true
quote-style = "single"
skip-magic-trailing-comma = false
[tool.ruff.lint]
preview = true
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"D", # pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"ASYNC", # flake8-async
"S", # flake8-bandit
"BLE", # flake8-blind-except
"A", # flake8-builtins
"COM", # flake8-commas
"FA", # flake8-future-annotations
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"G", # flake8-logging-format
"PIE", # flake8-pie
"PYI", # flake8-pyi
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SIM", # flake8-simplify
"TC", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PGH", # pygrep-hooks
"PL", # pylint
"TRY", # tryceratops
"PERF", # perflint
"FURB", # refurb
"RUF", # ruff-specific rules
# "DTZ", # flake8-datetimez
]
ignore = [
"ANN401", # any-type
"COM812", # trailing-comma-missing, conflicts with black
"COM819", # prohibited-trailing-comma
"E501", # line-too-long, handled by black
"ISC001", # single-line-implicit-string-concatenation, conflicts with black
"S101", # assert, handled by pytest
"SIM117", # multiple-with-statements
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D106", # undocumented-public-nested-class
"D107", # undocumented-public-init
]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
[tool.ruff.lint.flake8-type-checking]
quote-annotations = true
runtime-evaluated-base-classes = [
"pydantic.BaseModel",
"valorant.models.base.BaseModel",
"valorant.models.base.BaseUUIDModel",
]
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true
[tool.ruff.lint.per-file-ignores]
"valorant/*" = [
"PLR0904", # too-many-public-methods
]
"valorant/http.py" = [
"A005", # builtin-module-shadowing
"PLR2004", # magic-value-comparison
]
[tool.pytest.ini_options]
addopts = "-vv --showlocals --tb=short --strict -p no:warnings --cov=valorant --cov=tests"
[tool.coverage.report]
show_missing = true
precision = 2
exclude_also = ["if TYPE_CHECKING:", "def __repr__"]