TelegramWalletPay
/
pyproject.toml
200 строк · 4.3 Кб
1[build-system]
2requires = ["hatchling"]
3build-backend = "hatchling.build"
4
5[project]
6name = "telegram-wallet-pay"
7dynamic = ["version"]
8description = "Async client for Telegram Wallet Pay API"
9readme = "README.md"
10requires-python = ">=3.8"
11license = "MIT"
12authors = [
13{ name = "Oleg Abramov", email = "oleg@trueweb.app" },
14]
15maintainers = [
16{ name = "Oleg Abramov", email = "oleg@trueweb.app" },
17]
18keywords = [
19"Telegram",
20"Wallet",
21"Pay",
22"API",
23"async",
24]
25classifiers = [
26"Development Status :: 4 - Beta",
27"Framework :: AsyncIO",
28"Framework :: Pydantic",
29"Intended Audience :: Customer Service",
30"Intended Audience :: Financial and Insurance Industry",
31"Operating System :: MacOS",
32"Operating System :: Microsoft :: Windows",
33"Operating System :: POSIX :: Linux",
34"License :: OSI Approved :: MIT License",
35"Programming Language :: Python",
36"Programming Language :: Python :: 3.8",
37"Programming Language :: Python :: 3.9",
38"Programming Language :: Python :: 3.10",
39"Programming Language :: Python :: 3.11",
40"Programming Language :: Python :: 3.12",
41"Programming Language :: Python :: Implementation :: CPython",
42"Programming Language :: Python :: Implementation :: PyPy",
43"Topic :: Software Development :: Libraries :: Application Frameworks",
44"Typing :: Typed",
45]
46
47dependencies = [
48"aiohttp>=3.8,<4",
49"pydantic>=2.4,<3",
50"certifi>=2023",
51]
52
53[project.optional-dependencies]
54dev = [
55"ruff>=0,<1",
56"mypy>=1,<2",
57"pre-commit>=3,<4",
58"fastapi-slim>=0.111,<1",
59"uvicorn>=0.29,<1",
60"httpx>=0.27,<1",
61"aiogram>=3.6,<4"
62]
63test = [
64"coverage>=7,<8",
65"pytest>=8,<9",
66"pytest-asyncio>=0,<1",
67"pytest-aiohttp>=1.0,<2",
68"pytest-cov>=5,<6",
69"aresponses>=3,<4",
70"fastapi-slim>=0.111,<1",
71"httpx>=0.27,<1",
72]
73
74
75[project.urls]
76Repository = "https://github.com/Olegt0rr/TelegramWalletPay"
77Documentation = "https://docs.wallet.tg/pay/"
78
79[tool.hatch.version]
80path = "telegram_wallet_pay/__init__.py"
81
82[tool.hatch.build.targets.sdist]
83exclude = [
84"/.github",
85]
86
87[tool.hatch.envs.default]
88features = [
89"dev",
90"test",
91]
92post-install-commands = [
93"pre-commit install",
94]
95
96[tool.hatch.envs.default.scripts]
97lint = [
98"ruff check telegram_wallet_pay --fix",
99]
100
101[tool.hatch.envs.dev]
102python = "3.8"
103features = [
104"dev",
105"test",
106]
107
108[[tool.hatch.envs.test.matrix]]
109python = ["3.8", "3.9", "310", "311", "312"]
110
111[tool.pytest.ini_options]
112asyncio_mode = "auto"
113testpaths = [
114"tests",
115]
116filterwarnings = [
117"error",
118"ignore::pytest.PytestUnraisableExceptionWarning",
119]
120
121[tool.coverage.report]
122exclude_lines = [
123"if __name__ == .__main__.:",
124"pragma: no cover",
125"if TYPE_CHECKING:",
126"@abstractmethod",
127"@overload",
128]
129
130
131[tool.mypy]
132warn_redundant_casts = true
133warn_unused_ignores = false
134warn_no_return = true
135warn_unreachable = true
136pretty = true
137
138[[tool.mypy.overrides]]
139module = "*.*"
140ignore_missing_imports = true
141
142[[tool.mypy.overrides]]
143module = "tests.*"
144ignore_errors = true
145
146[[tool.mypy.overrides]]
147module = "examples.*"
148ignore_errors = true
149
150
151[tool.ruff]
152src = ["app", "tools", "tests"]
153
154# Exclude a variety of commonly ignored directories.
155exclude = [
156".bzr",
157".direnv",
158".eggs",
159".git",
160".hg",
161".mypy_cache",
162".nox",
163".pants.d",
164".ruff_cache",
165".svn",
166".tox",
167".venv",
168"__pypackages__",
169"_build",
170"buck-out",
171"build",
172"dist",
173"node_modules",
174"venv",
175]
176
177# Same as Black.
178line-length = 88
179
180# Assume minimal Python version
181target-version = "py38"
182
183[tool.ruff.lint]
184select = ["ALL"]
185ignore = ["A003", "ANN002", "ANN003", "ANN101", "ANN102", "D100", "D101", "D106", "D107", "D104", "D203", "D213", "DTZ005", "FA100", "RUF001", "RUF002", "RUF003", "S101", "TCH001", "TCH002", "PT015", "PT017", "B011"]
186fixable = ["ALL"]
187unfixable = []
188
189# Allow unused variables when underscore-prefixed.
190dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
191
192[tool.ruff.lint.mccabe]
193max-complexity = 10
194
195[tool.ruff.lint.flake8-type-checking]
196runtime-evaluated-base-classes = ["pydantic.BaseModel", "telegram_wallet_pay.schemas._default.DefaultModel"]
197
198[tool.ruff.lint.per-file-ignores]
199"tests/*" = ["ANN401", "D", "FBT001", "INP001", "S101", "SLF001"]
200"examples/*" = ["INP001", "T201"]
201