-
Notifications
You must be signed in to change notification settings - Fork 479
Expand file tree
/
Copy pathpyproject.toml
More file actions
304 lines (293 loc) · 9.8 KB
/
Copy pathpyproject.toml
File metadata and controls
304 lines (293 loc) · 9.8 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
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
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "flexget"
description = """\
FlexGet is a program aimed to automate downloading or processing content (torrents, podcasts, etc.) from different \
sources like RSS-feeds, html-pages, various sites and more.\
"""
readme = "README.rst"
license = "MIT"
license-files = [ "LICENSE" ]
authors = [
{ name = "Chase Sterling", email = "chase.sterling@gmail.com" },
{ name = "Marko Koivusalo", email = "marko.koivusalo@gmail.com" },
]
requires-python = ">=3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"Natural Language :: English",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = [ "optional-dependencies", "version" ]
dependencies = [
"apscheduler~=3.11",
"beautifulsoup4~=4.12",
"cherrypy~=18.10",
"cryptography~=50.0",
"curl-cffi~=0.16; platform_system in 'Linux Darwin Windows'",
"feedparser~=6.0",
"flask~=3.1",
"flask-compress~=1.17",
"flask-cors~=6.0",
"flask-login~=0.6.3",
"flask-restx~=1.3",
"guessit~=4.2.1", # guessit v4.3.0 causes the test `test_ambiguous` to fail. See https://github.com/guessit-io/guessit/issues/966.
"html5lib~=1.1",
"jinja2~=3.1",
"jsonschema~=4.23",
"loguru~=0.7.3",
"packaging~=26.0",
"pendulum~=3.0",
"psutil~=7.0",
"pynzb~=0.1.0",
"pyparsing~=3.2",
"pyrss2gen~=1.1",
"python-dateutil~=2.9",
"pyyaml~=6.0",
"rebulk~=6.0",
"requests~=2.32",
"rich~=15.0",
"rpyc~=6.0",
"sqlalchemy~=2.0",
"typing-extensions>=4.16; python_version<='3.12'",
"werkzeug~=3.1",
"zxcvbn~=4.4",
]
urls."Issue Tracker" = "https://github.com/Flexget/Flexget/issues"
urls.Forum = "https://github.com/Flexget/Flexget/discussions"
urls.Homepage = "https://flexget.com"
urls.Repository = "https://github.com/Flexget/Flexget"
scripts.flexget = "flexget:main"
gui-scripts.flexget-headless = "flexget:main" # This is useful on Windows to avoid a cmd popup
[dependency-groups]
dev = [
"prek~=0.4.12",
"pytest~=9.0",
"pytest-cov~=7.0",
"pytest-socket~=0.8.0",
"pytest-xdist~=3.6",
"ruff==0.16.8",
"vcrpy~=8.1",
]
test = [
"pillow~=12.1",
"pytest-localftpserver>=1.6",
{ include-group = "all" },
]
docs = [
"pydata-sphinx-theme~=0.20.0",
"sphinx~=9.1",
"sphinx-copybutton~=0.5.2",
"sphinx-design~=0.7.0",
"sphinxcontrib-svg2pdfconverter~=2.0",
]
# This is all our optional deps installable via extras, not actually 'all'.
# Tests that need these must add the `require_optional_deps` pytest mark.
all = [
{ include-group = "boto3" },
{ include-group = "deluge" },
{ include-group = "ftp" },
{ include-group = "matrix" },
{ include-group = "plexapi" },
{ include-group = "qbittorrent" },
{ include-group = "rarfile" },
{ include-group = "sftp" },
{ include-group = "subliminal" },
{ include-group = "telegram" },
{ include-group = "transmission" },
]
boto3 = [ "boto3~=1.35" ]
deluge = [ "deluge-client~=1.10" ]
ftp = [ "ftputil~=5.1" ]
matrix = [ "matrix-nio~=0.26.0" ]
plexapi = [ "plexapi~=4.17" ]
qbittorrent = [ "qbittorrent-api~=2026.8" ]
rarfile = [ "rarfile~=4.0" ]
sftp = [
"paramiko~=3.5",
"pysftp~=0.2.9", # TODO: `pysftp` was last updated in 2016 and is merely a wrapper around `paramiko`. It is now incompatible with `paramiko` 4.0, so consider migrating to `paramiko` directly. See https://github.com/Flexget/Flexget/issues/4532
]
subliminal = [ "subliminal~=2.7.1" ]
telegram = [ "python-telegram-bot[http2,socks]~=22.0" ]
transmission = [ "transmission-rpc~=7.0" ]
[tool.hatch]
version.path = "flexget/_version.py"
metadata.hooks.custom.locked-groups = [
"boto3",
"deluge",
"ftp",
"matrix",
"plexapi",
"qbittorrent",
"rarfile",
"sftp",
"subliminal",
"telegram",
"transmission",
"all",
]
# Extras with locked dependencies will be generated if BUILD_LOCKED env variable is specified
metadata.hooks.custom.path = "scripts/build_locked_extras.py"
build.skip-excluded-dirs = true
build.targets.wheel.include = [
"/flexget",
]
# The webui will be bundled when the BUNDLE_WEBUI env variable is defined
build.targets.wheel.hooks.custom.path = "scripts/bundle_webui.py"
build.targets.sdist.include = [
"/flexget",
"/scripts/build_locked_extras.py",
"/scripts/bundle_webui.py",
]
[tool.uv]
dependency-groups.docs = { requires-python = ">=3.13" }
[tool.ruff]
line-length = 99
extend-exclude = [ "flexget/ui" ]
preview = true
format.quote-style = "single"
format.docstring-code-format = true # Ruff’s documentation claims that this will become the default behavior in the future, so we won’t need to specify it explicitly.
lint.select = [ "ALL" ]
lint.ignore = [
"A",
"ANN",
"ARG",
"blind-except",
"camelcase-imported-as-acronym", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4234#discussion_r1951605123
"COM", # Ruff recommends against using this rule alongside the Ruff formatter.
"commented-out-code",
"complex-structure",
"DTZ",
"EM",
"error-instead-of-exception", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4249#issuecomment-2656387500
"error-suffix-on-exception-name", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4234#pullrequestreview-2610029402
"FBT",
"global-statement",
"implicit-namespace-package",
"import-outside-top-level", # TODO
"incorrect-blank-line-before-class", # Conflicting with "blank-line-before-class"
"line-contains-hack", # We use "HACK" comments as a form of documentation
"line-contains-todo", # We use "TODO" comments as a form of documentation
"line-too-long", # TODO
"logging-too-many-args", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/13390
"magic-value-comparison",
"missing-copyright-notice", # This project intentionally omits per-file copyright notices.
"missing-terminal-punctuation", # Already included in "missing-trailing-period"
"missing-todo-author", # We don't require TODO comments to include an author.
"missing-todo-link", # We don't require TODO comments to include an issue link.
"multi-line-summary-second-line", # Conflicting with "multi-line-summary-first-line"
"mutable-class-default", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/5243
"os-path-basename", # TODO
"private-member-access",
"Q", # Ruff recommends against using this rule alongside the formatter.
"raise-vanilla-args",
"raise-without-from-inside-except", # TODO
"redefined-argument-from-local",
"redefined-loop-name",
"S",
"self-or-cls-assignment",
"too-many-arguments",
"too-many-branches",
"too-many-positional-arguments",
"too-many-return-statements",
"too-many-statements",
"undocumented-magic-method",
"undocumented-public-class",
"undocumented-public-function",
"undocumented-public-init",
"undocumented-public-method",
"undocumented-public-module",
"undocumented-public-package"
]
lint.explicit-preview-rules = true
lint.per-file-ignores."docs/scripts/*" = [ "T20" ]
lint.per-file-ignores."flexget/*" = [ "PTH" ] # TODO
lint.per-file-ignores."scripts/*" = [ "T20" ]
lint.per-file-ignores."tests/*" = [ "T20" ]
lint.flake8-type-checking.quote-annotations = true
lint.isort.known-first-party = [ "flexget" ]
lint.future-annotations = true
per-file-target-version."scripts/cleanup_cassettes.py" = "py312"
[tool.codespell]
skip = [
"**/cassettes/*",
"flexget/api/templates/api_response.html",
"flexget/api/templates/swagger-ui.html",
"flexget/utils/bittorrent.py",
"flexget/utils/parsers/series.py",
"pyproject.toml",
"tests/couchpotato_movie_list_test_response.json",
"tests/LICENSE.torrent",
"tests/test_thetvdb.py",
]
[tool.pyproject-fmt]
keep_full_version = true
max_supported_python = "3.15"
[tool.typos]
default.extend-ignore-re = [
"(?s)#\\s*typos:off.*?\\n\\s*#\\s*typos:on",
]
default.extend-ignore-identifiers-re = [
"idel",
"parametros",
"Programe",
"searchin",
"SerieS",
"23BA98",
"IST",
"McClory",
"[Pp]yload",
"Namee",
]
default.extend-ignore-words-re = [
"nd",
"sur",
"hime",
]
files.extend-exclude = [
"**/cassettes/*",
"flexget/utils/waf/webgl.json",
"tests/couchpotato_movie_list_test_response.json",
"tests/couchpotato_quality_profile_test_response.json",
"tests/test_thetvdb.py",
]
[tool.pytest]
addopts = [ "-p no:legacypath" ]
filterwarnings = [
"error",
"ignore:Failed to load HostKeys from:UserWarning:pysftp", # It's a bug in pysftp (unmaintained) 0.2.9, not in 0.2.8: https://stackoverflow.com/q/56521549
"ignore:chardet.universaldetector is deprecated:DeprecationWarning:html5lib._inputstream", # See https://github.com/html5lib/html5lib-python/pull/602
"""\
ignore:In ftputil 6.0.0, the default file path encoding will change from Latin-1 to \
UTF-8.:DeprecationWarning:flexget.components.ftp.ftp_list\
"""
]
markers = [
"filecopy(src, dst): mark test to copy a file from `src` to `dst` before running",
"online: mark test that goes online. VCR will automatically be used.",
"require_optional_deps: mark test as requiring additional dependencies",
]
strict = true
testpaths = [ "tests" ]
[tool.coverage]
run.branch = true
report.exclude_also = [
"if TYPE_CHECKING",
]
[tool.doc8]
ignore = [ "D001", "D004" ]
max_line_length = 99