Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
118 lines (106 loc) · 3.08 KB
/
Copy pathpyproject.toml
File metadata and controls
118 lines (106 loc) · 3.08 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
[build-system]
requires = ["hatchling>=1.18"]
build-backend = "hatchling.build"
[project]
name = "avitoapi"
version = "0.1.0"
description = "Aiogram-style async Python SDK over the Avito Partner API."
readme = "README.md"
requires-python = ">=3.11"
license = { text = "MIT" }
authors = [{ name = "zlexdev" }]
keywords = ["avito", "sdk", "async", "api", "aiogram-style"]
classifiers = [
"Development Status :: 3 - Alpha",
"Framework :: AsyncIO",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
]
dependencies = [
"pydantic>=2.6",
"pydantic-settings>=2.2",
"curl_cffi>=0.7",
"structlog>=24",
"email-validator>=2.1",
]
[project.optional-dependencies]
httpx = ["httpx>=0.27"]
redis = ["redis>=5.0"]
mongo = ["motor>=3.4"]
postgres = ["asyncpg>=0.29"]
fastapi = ["fastapi>=0.110", "uvicorn>=0.27"]
litestar = ["litestar>=2.7", "uvicorn>=0.27"]
sanic = ["sanic>=23.6"]
playwright = ["playwright>=1.42"]
twocaptcha = ["2captcha-python>=1.2"]
capsolver = ["capsolver>=1.0"]
dev = [
"pytest>=8",
"pytest-asyncio>=0.23",
"pytest-cov>=5",
"ruff>=0.4",
"mypy>=1.10",
"httpx>=0.27",
"fakeredis>=2.21",
"mongomock>=4.1",
]
[project.urls]
Homepage = "https://github.com/zlexdev/avitoapi"
Issues = "https://github.com/zlexdev/avitoapi/issues"
[tool.hatch.build.targets.wheel]
packages = ["avitoapi"]
[tool.hatch.metadata]
allow-direct-references = true
[tool.ruff]
target-version = "py311"
line-length = 100
src = ["avitoapi", "tests"]
[tool.ruff.lint]
select = [
"E", "F", "W", "I", "B", "UP", "SIM", "PIE", "ASYNC",
"ANN", "PL", "RUF", "PT", "TID", "T20", "ERA",
]
ignore = [
"ANN401",
"PLR0913",
"PLR2004",
"TID252", # relative imports — intentional per aiogram-style-sdk-framework skill
"PLC0415", # lazy imports — intentional for circular-dep break + optional-dep gating
"E501", # long lines — ruff format already enforces a soft cap
"B027", # empty abstract default OK on ABC hook methods
"RUF012", # mutable class default — explicit override on Pydantic models
"RUF100", # let project decide on individual noqa lines
"RUF001", "RUF002", "RUF003", # ambiguous Cyrillic — intentional (Russian API domain)
"PLC2401", # non-ASCII identifiers — Avito enum values are Russian
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["ANN", "PLR2004", "B011", "SIM102", "SIM105", "F841", "PLW0603", "PT017", "PT006", "RUF003", "RUF015"]
"avitoapi/**/__init__.py" = ["PLC0414"]
[tool.mypy]
python_version = "3.11"
strict = true
warn_return_any = true
warn_unused_ignores = true
disallow_any_generics = true
no_implicit_optional = true
plugins = ["pydantic.mypy"]
[[tool.mypy.overrides]]
module = [
"curl_cffi.*",
"fakeredis.*",
"mongomock.*",
"aiohttp.*",
"asyncpg.*",
"fastapi.*",
"litestar.*",
"sanic.*",
"sanic.response",
"uvicorn.*",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]
filterwarnings = ["error"]