File: pyproject.toml

package info (click to toggle)
python-itemadapter 0.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: python: 3,384; makefile: 4
file content (263 lines) | stat: -rw-r--r-- 5,940 bytes parent folder | download
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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "itemadapter"
description = "Common interface for data container classes"
authors = [
    { name = "Eugenio Lacuesta", email = "eugenio.lacuesta@gmail.com" },
]
readme = "README.md"
license = "BSD-3-Clause"
license-files = ["LICENSE"]
requires-python = ">=3.9"
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "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 :: Implementation :: CPython",
    "Programming Language :: Python :: Implementation :: PyPy",
    "Operating System :: OS Independent",
    "Framework :: Scrapy",
    "Topic :: Internet :: WWW/HTTP",
    "Topic :: Software Development :: Libraries :: Application Frameworks",
    "Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ["version"]

[project.optional-dependencies]
attrs = [
    "attrs>=20.1.0",
]
pydantic = [
    "pydantic>=1.8",
]
scrapy = [
    "scrapy>=2.2",
]

[project.urls]
Homepage = "https://github.com/scrapy/itemadapter"
Source = "https://github.com/scrapy/itemadapter"
Tracker = "https://github.com/scrapy/itemadapter/issues"
"Release notes" = "https://github.com/scrapy/itemadapter/blob/master/Changelog.md"

[tool.hatch.version]
path = "itemadapter/__init__.py"

[tool.hatch.build.targets.sdist]
include = [
    "/itemadapter",
    "/tests",
    "/Changelog.md",
    "/tox.ini",
]

[tool.bumpversion]
current_version = "0.13.0"
commit = true
tag = true

[[tool.bumpversion.files]]
filename = "Changelog.md"
search = "\\(unreleased\\)$"
replace = "({now:%Y-%m-%d})"
regex = true

[[tool.bumpversion.files]]
filename = "itemadapter/__init__.py"

[tool.pylint.MASTER]
persistent = "no"
load-plugins=[
    "pylint_per_file_ignores",
]


[tool.pylint."MESSAGES CONTROL"]
enable = [
    "useless-suppression",
]
disable = [
    "cyclic-import",
    "duplicate-code",
    "import-error",
    "import-outside-toplevel",
    "invalid-name",
    "line-too-long",  # https://docs.astral.sh/ruff/rules/line-too-long/
    "missing-class-docstring",
    "missing-function-docstring",
    "missing-module-docstring",
    "not-callable",
    "pointless-statement",
    "protected-access",
    "too-few-public-methods",
    "too-many-return-statements",
    "unused-argument",
]
per-file-ignores = [
    "/tests/:disallowed-name,too-many-instance-attributes",
    "/itemadapter/_imports.py:unused-import,ungrouped-imports",
]

[tool.pylint.FORMAT]
expected-line-ending-format = "LF"
max-line-length = 99

[tool.pylint.IMPORTS]
allow-any-import-level = [
    "attr",
    "dataclasses",
    "scrapy"
]

[tool.pytest.ini_options]
filterwarnings = [
    "ignore:.*BaseItem.*",
]

[tool.ruff]
line-length = 99

[tool.ruff.lint]
extend-select = [
    # flake8-builtins
    "A",
    # flake8-async
    "ASYNC",
    # flake8-bugbear
    "B",
    # flake8-comprehensions
    "C4",
    # flake8-commas
    "COM",
    # pydocstyle
    "D",
    # flake8-future-annotations
    "FA",
    # flynt
    "FLY",
    # refurb
    "FURB",
    # isort
    "I",
    # flake8-implicit-str-concat
    "ISC",
    # flake8-logging
    "LOG",
    # Perflint
    "PERF",
    # pygrep-hooks
    "PGH",
    # flake8-pie
    "PIE",
    # pylint
    "PL",
    # flake8-pytest-style
    "PT",
    # flake8-use-pathlib
    "PTH",
    # flake8-pyi
    "PYI",
    # flake8-quotes
    "Q",
    # flake8-return
    "RET",
    # flake8-raise
    "RSE",
    # Ruff-specific rules
    "RUF",
    # flake8-bandit
    "S",
    # flake8-simplify
    "SIM",
    # flake8-slots
    "SLOT",
    # flake8-debugger
    "T10",
    # flake8-type-checking
    "TC",
    # flake8-tidy-imports
    "TID",
    # pyupgrade
    "UP",
    # pycodestyle warnings
    "W",
    # flake8-2020
    "YTT",
]
ignore = [
    # Trailing comma missing
    "COM812",
    # Missing docstring in public module
    "D100",
    # Missing docstring in public class
    "D101",
    # Missing docstring in public method
    "D102",
    # Missing docstring in public function
    "D103",
    # Missing docstring in public package
    "D104",
    # Missing docstring in magic method
    "D105",
    # Missing docstring in public nested class
    "D106",
    # Missing docstring in __init__
    "D107",
    # One-line docstring should fit on one line with quotes
    "D200",
    # No blank lines allowed after function docstring
    "D202",
    # 1 blank line required between summary line and description
    "D205",
    # Multi-line docstring closing quotes should be on a separate line
    "D209",
    # First line should end with a period
    "D400",
    # First line should be in imperative mood; try rephrasing
    "D401",
    # First line should not be the function's "signature"
    "D402",
    # First word of the first line should be properly capitalized
    "D403",
    # `import` should be at the top-level of a file
    "PLC0415",
    # Too many return statements
    "PLR0911",
    # Too many branches
    "PLR0912",
    # Too many arguments in function definition
    "PLR0913",
    # Too many statements
    "PLR0915",
    # Magic value used in comparison
    "PLR2004",
    # String contains ambiguous {}.
    "RUF001",
    # Docstring contains ambiguous {}.
    "RUF002",
    # Comment contains ambiguous {}.
    "RUF003",
    # Mutable class attributes should be annotated with `typing.ClassVar`
    "RUF012",
    # Use of `assert` detected
    "S101",
]

[tool.ruff.lint.isort]
split-on-trailing-comma = false

[tool.ruff.lint.pydocstyle]
convention = "pep257"

[tool.ruff.lint.pyupgrade]
# for Pydantic annotations while we support Python 3.9
keep-runtime-typing = true