-
-
Notifications
You must be signed in to change notification settings - Fork 69
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (191 loc) · 5.59 KB
/
Copy pathpyproject.toml
File metadata and controls
213 lines (191 loc) · 5.59 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
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
[project]
name = "audible-cli"
version = "0.6.0"
description = "Command line interface (cli) for the audible package."
authors = [{ name = "mkb79", email = "mkb79@hackitall.de" }]
requires-python = ">=3.11,<3.15"
readme = "DESCRIPTION.md"
license = "AGPL-3.0-only"
keywords = [
"Audible",
"API",
"async",
"cli"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"aiofiles>=25.1.0",
"audible>=0.11.0",
"click>=8.4.2",
"colorama>=0.4.6; platform_system=='Windows'",
"httpx>=0.27.2,<0.29",
"packaging>=26.2",
"Pillow>=12.3.0",
# `_dialog` imports `create_output` directly, so it is declared here
# rather than borrowed from questionary, and capped below the major
# release that could move it.
"prompt_toolkit>=3.0.52,<4",
"tabulate>=0.10.0",
"toml>=0.10.2",
"tqdm>=4.69.0",
"questionary>=2.1.1",
]
homepage = "https://github.com/mkb79/audible-cli"
repository = "https://github.com/mkb79/audible-cli"
documentation = "https://audible-cli.readthedocs.io/"
[project.optional-dependencies]
cryptography = [
"audible[cryptography]>=0.11.0",
]
# For platforms cryptography publishes no wheel for, currently Windows on
# arm64. Same job, different implementation, both faster than the pure
# Python fallback.
pycryptodome = [
"audible[pycryptodome]>=0.11.0",
]
[project.urls]
Changelog = "https://github.com/mkb79/audible-cli/releases"
[project.scripts]
audible = "audible_cli:main"
audible-quickstart = "audible_cli:quickstart"
[dependency-groups]
dev = [
"pyinstaller",
"pytest>=8.4.2",
# Pinned: the enabled rule families pull in new stable rules on an
# upgrade, which would turn the gate red without a code change
"ruff==0.16.4"
]
[tool.hatch.build.targets.sdist]
include = ["src/audible_cli"]
[tool.hatch.build.targets.wheel]
include = ["src/audible_cli"]
[tool.hatch.build.targets.wheel.sources]
"src/audible_cli" = "audible_cli"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
required-version = ">=0.7.6"
[tool.coverage.paths]
source = ["src/audible_cli", "*/site-packages"]
tests = ["tests", "*/tests"]
[tool.coverage.run]
branch = true
source = ["src/audible_cli", "tests"]
relative_files = true
[tool.coverage.report]
show_missing = true
fail_under = 10 # temporarily drop complexity, target is 100
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:"
]
[tool.mypy]
python_version = "3.11"
pretty = true
show_column_numbers = true
show_error_codes = true
show_error_context = true
strict = true
warn_unreachable = true
[tool.ruff]
# missing rst-docstrings check, these should be adding through ruff
line-length = 88
src = ["src", "plugin_cmds", "utils"]
target-version = "py311"
output-format = "grouped"
[tool.ruff.format]
# Files the formatter has never run over. Take one off the list by
# running `ruff format` on it in a commit of its own.
exclude = [
"docs/source/conf.py",
"plugin_cmds/cmd_decrypt.py",
"plugin_cmds/cmd_get-annotations.py",
"plugin_cmds/cmd_goodreads-transform.py",
"plugin_cmds/cmd_image-urls.py",
"plugin_cmds/cmd_listening-stats.py",
"plugin_cmds/convert_oa_cred.py",
"plugin_cmds/README.md",
"pyi_entrypoint.py",
"README.md",
"src/audible_cli/cli.py",
"src/audible_cli/cmds/cmd_activation_bytes.py",
"src/audible_cli/cmds/cmd_api.py",
"src/audible_cli/cmds/cmd_download.py",
"src/audible_cli/cmds/cmd_library.py",
"src/audible_cli/cmds/cmd_manage.py",
"src/audible_cli/cmds/cmd_quickstart.py",
"src/audible_cli/cmds/cmd_wishlist.py",
"src/audible_cli/cmds/__init__.py",
"src/audible_cli/config.py",
"src/audible_cli/constants.py",
"src/audible_cli/decorators.py",
"src/audible_cli/downloader.py",
"src/audible_cli/__main__.py",
"src/audible_cli/models.py",
"src/audible_cli/plugins.py",
"src/audible_cli/utils.py",
"utils/update_chapter_titles.py",
]
[tool.ruff.lint]
ignore = [
"D10", # temporarily ignore missing docstrings
"E501",
"N818",
"PLR0912", # temporarily
"PLR0913", # temporarily
"PLR0915", # temporarily
"PLR2004", # temporarily
]
select=[
"A",
"ASYNC",
"B",
"C4",
"C90",
"D",
"E",
"F",
"G",
"I",
"N",
"PGH",
"PL",
"Q",
"RUF",
"S",
"UP",
"W",
]
[tool.ruff.lint.mccabe]
max-complexity = 21 # temporarily raise complexity, target is 10
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
force-single-line = false
known-first-party = ["audible_cli"]
lines-after-imports = 2
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
# Baseline: findings that predate the Ruff gate. Each entry lists the rules a
# file already breaks. A new file, and a rule not listed for a file, both
# still fail; another violation of a rule already listed for that same file
# does not, because per-file-ignores keys on file and rule rather than on
# individual findings. Shrink the list by fixing a rule in a file and
# dropping its code here.
"plugin_cmds/cmd_decrypt.py" = ["PLR0917"]
"src/audible_cli/cmds/cmd_download.py" = ["ASYNC240", "C901", "PLR0917", "PLW0603", "PLW2901"]
"src/audible_cli/cmds/cmd_manage.py" = ["PLR0917"]
"src/audible_cli/downloader.py" = ["PLR0917"]
"src/audible_cli/utils.py" = ["PLR0917"]
[tool.pytest.ini_options]
testpaths = ["tests"]