-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathpyproject.toml
More file actions
144 lines (129 loc) · 4.46 KB
/
pyproject.toml
File metadata and controls
144 lines (129 loc) · 4.46 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
[project]
name = "python-amazon-paapi"
version = "6.1.0"
description = "Amazon Product Advertising API 5.0 wrapper for Python"
readme = "README.md"
requires-python = ">=3.9"
license = "MIT"
authors = [{ name = "Sergio Abad", email = "sergio.abad@bytelix.com" }]
keywords = ["amazon", "paapi", "product-advertising-api", "affiliate", "api"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"certifi>=2023.0.0",
"pydantic>=2.0.0",
"python_dateutil>=2.8.0",
"requests>=2.28.0",
"six>=1.16.0",
"urllib3>=1.26.0,<3",
]
[project.urls]
Homepage = "https://github.com/sergioteula/python-amazon-paapi"
Repository = "https://github.com/sergioteula/python-amazon-paapi"
[project.optional-dependencies]
async = ["httpx>=0.27.0", "typing-extensions>=4.15.0"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["amazon_paapi", "amazon_creatorsapi", "creatorsapi_python_sdk"]
[dependency-groups]
dev = [
"mypy>=1.19.1",
"pre-commit>=2.21.0",
"pytest>=7.4.4",
"pytest-cov>=4.1.0",
"python-dotenv>=1.2.1",
"ruff>=0.14.11",
"types-requests>=2.32.4.20260107",
]
[tool.ruff]
target-version = "py39"
cache-dir = ".cache/ruff"
exclude = ["amazon_paapi/sdk/*", "creatorsapi_python_sdk/*", "docs/*"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"ANN003", # Missing type annotation for **kwargs
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"D203", # 1 blank line required before class docstring (conflicts with D211)
"D213", # Multi-line docstring summary should start at the second line (conflicts with D212)
"COM812", # Missing trailing comma (conflicts with Ruff formatter)
"ISC001", # Implicitly concatenated string literals (conflicts with Ruff formatter)
"PT019", # Fixture without value is injected as parameter
]
exclude = ["amazon_paapi/sdk/*", "creatorsapi_python_sdk/*", "docs/*"]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"ANN201", # Missing return type annotation for public function
"ANN206", # Missing return type annotation for classmethod
"ARG002", # Unused method argument (mock parameters are ok)
"D", # pydocstring rules (no docstrings required for tests)
"PT009", # Use a regular assert instead of unittest-style
"PT027", # Use pytest.raises instead of unittest-style
"S101", # Use of assert detected (assert is fine in tests)
"S105", # Possible hardcoded password (test credentials are ok)
"S106", # Possible hardcoded password argument (test credentials are ok)
"SIM117", # Multiple context managers (nested with is ok in tests)
"SLF001", # Private member accessed
]
"scripts/*" = [
"T201", # print found (CLI scripts use print)
]
"**/api.py" = ["PLR0913"] # Too many arguments to function call
"amazon_paapi/*" = [
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default value in function definition
"N818", # Exception name should be named with an Error suffix
]
[tool.ruff.format]
exclude = [
"amazon_paapi/sdk/*",
"creatorsapi_python_sdk/*",
"docs/*",
".github",
]
[tool.mypy]
python_version = "3.9"
ignore_missing_imports = true
no_implicit_optional = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
cache_dir = '.cache/mypy'
exclude = ["amazon_paapi/sdk/*", "creatorsapi_python_sdk/*"]
[[tool.mypy.overrides]]
module = ["amazon_paapi/sdk/*"]
follow_imports = "skip"
[tool.coverage.run]
branch = true
relative_files = true
source = ["amazon_paapi", "amazon_creatorsapi"]
omit = ["amazon_paapi/sdk/*"]
[tool.coverage.report]
precision = 2
skip_covered = true
skip_empty = true
fail_under = 98
[tool.coverage.html]
directory = "coverage_html_report"
skip_covered = false
[tool.pytest.ini_options]
testpaths = "tests"
cache_dir = ".cache/pytest"