-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathpyproject.toml
More file actions
148 lines (137 loc) · 4.69 KB
/
Copy pathpyproject.toml
File metadata and controls
148 lines (137 loc) · 4.69 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
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
[project]
name = "yoomoney"
version = "2.0.0"
description = "Unofficial YooMoney API python library"
readme = "README.rst"
license = "GPL-3.0-only"
requires-python = ">=3.10"
authors = [
{ name = "AlekseyKorshuk", email = "ale-kor02@mail.ru" },
]
keywords = ["yoomoney", "api", "payments", "wallet"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"httpx>=0.27.0",
"pydantic>=2.0.0",
]
[project.urls]
Homepage = "https://github.com/AlekseyKorshuk/yoomoney-api"
Repository = "https://github.com/AlekseyKorshuk/yoomoney-api"
Issues = "https://github.com/AlekseyKorshuk/yoomoney-api/issues"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["yoomoney"]
[tool.hatch.build.targets.sdist]
include = [
"yoomoney/",
"LICENSE",
"README.rst",
]
[dependency-groups]
dev = [
"mypy>=1.19.0",
"ruff>=0.15.0",
]
# -- Mypy -----------------------------------------------------------------
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
allow_subclassing_any = true
allow_untyped_calls = true
pretty = true
show_error_codes = true
implicit_reexport = true
allow_untyped_decorators = true
warn_unused_ignores = false
warn_return_any = false
namespace_packages = true
# -- Ruff -----------------------------------------------------------------
[tool.ruff]
line-length = 100
target-version = "py310"
[tool.ruff.lint]
select = [
"F", # pyflakes – avoid common mistakes
"B", # flake8-bugbear – common bug patterns
"E", # pycodestyle errors – format code consistently
"N", # pep8-naming – use naming conventions
"ANN", # flake8-annotations – use type annotations
"W", # pycodestyle warnings
"I", # isort – sort imports
"ICN", # flake8-import-conventions
"ASYNC", # flake8-async – use async correctly
"S", # flake8-bandit – avoid common security issues
"UP", # pyupgrade – use latest python syntax
"C90", # mccabe – reduce complexity
"A", # flake8-builtins – don't shadow built-ins
"T20", # flake8-print – no print in production
"T100", # flake8-debugger – no debuggers in production
"RET", # flake8-return – return correctly
"SIM", # flake8-simplify – simplify your code
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"PERF", # perflint – common performance issues
"RUF", # ruff-specific best practices
"C4", # flake8-comprehensions
"COM", # flake8-commas
"DTZ", # flake8-datetimez
"ISC", # flake8-implicit-str-concat
"G", # flake8-logging-format
"PIE", # flake8-pie – misc lints
]
ignore = [
"ANN003", # don't annotate **kwargs
"ANN401", # allow Any
"RET504", # allow unnecessary assignment before return
"COM812", # trailing comma – conflicts with formatter
"ISC001", # implicit string concat – conflicts with formatter
]
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = [
"S101", # asserts allowed in tests
"ARG", # unused function args (fixtures)
"PLR2004", # magic values in comparisons
"S311", # pseudo-random generators
"S105", # possible hardcoded passwords
"S106", # possible hardcoded passwords
"ANN", # annotations not required in tests
]
"examples/**/*.py" = [
"T20", # print allowed in examples
"ANN", # annotations not required in examples
"S105", # possible hardcoded passwords (token placeholders)
"S106", # possible hardcoded passwords
]
# -- Library per-file ignores (interface-preserving, unfixable) --
"yoomoney/exceptions.py" = [
"N818", # exception names are public API – no "Error" suffix by design
]
"yoomoney/authorize/authorize.py" = [
"T201", # print() is intentional – interactive OAuth flow outputs to stdout
]
"yoomoney/quickpay/quickpay.py" = [
"N803", # camelCase params (paymentType, successURL) match YooMoney API
"A002", # `sum` param name matches YooMoney API
]
"yoomoney/client.py" = [
"A002", # `type` param in operation_history() matches YooMoney API
]
"yoomoney/_async_client.py" = [
"A002", # `type` param in operation_history() matches YooMoney API
]
"yoomoney/_parsers.py" = [
"A002", # `type` param in build_history_payload() matches YooMoney API
]