-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
253 lines (239 loc) · 8.9 KB
/
pyproject.toml
File metadata and controls
253 lines (239 loc) · 8.9 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
[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.10"
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.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Utilities",
"Typing :: Typed",
]
dynamic = [ "optional-dependencies", "version" ]
dependencies = [
"apscheduler~=3.11",
"beautifulsoup4~=4.12",
"cherrypy~=18.10",
"feedparser~=6.0",
"flask~=3.1",
"flask-compress~=1.17",
"flask-cors~=6.0",
"flask-login~=0.6.3",
"flask-restx~=1.3",
"guessit~=3.8",
"html5lib~=1.1",
"jinja2~=3.1",
"jsonschema~=4.23",
"loguru~=0.7.3",
"packaging~=25.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~=3.2",
"requests~=2.32",
"rich~=14.0",
"rpyc~=6.0",
"sqlalchemy~=2.0",
"werkzeug~=3.1",
"zxcvbn~=4.4",
]
urls."Forum" = "https://github.com/Flexget/Flexget/discussions"
urls."Homepage" = "https://flexget.com"
urls."Issue Tracker" = "https://github.com/Flexget/Flexget/issues"
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 = [
"pre-commit~=4.0",
"pytest~=8.3",
"pytest-cov~=6.1",
"pytest-xdist~=3.6",
"ruff==0.12.9",
"vcrpy~=7.0",
]
docs = [
"pydata-sphinx-theme~=0.16",
"sphinx~=8.1",
"sphinx-copybutton~=0.5",
"sphinx-design~=0.6",
]
boto3 = [ "boto3~=1.35" ]
deluge = [ "deluge-client~=1.10" ]
ftp = [ "ftputil~=5.1" ]
plexapi = [ "plexapi~=4.16" ]
qbittorrent = [ "qbittorrent-api~=2025.2" ]
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.2.1", # TODO: Update subliminal after https://github.com/Diaoul/subliminal/issues/1302 is resolved.
]
telegram = [ "pillow~=11.0", "python-telegram-bot[http2,socks]~=22.0" ]
transmission = [ "transmission-rpc~=7.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 = "plexapi" },
{ include-group = "qbittorrent" },
{ include-group = "rarfile" },
{ include-group = "sftp" },
{ include-group = "subliminal" },
{ include-group = "telegram" },
{ include-group = "transmission" },
]
[tool.hatch.metadata.hooks.custom]
# Extras with locked dependencies will be generated if BUILD_LOCKED env variable is specified
path = "scripts/build_locked_extras.py"
locked-groups = [
'boto3',
"deluge",
'ftp',
'plexapi',
"qbittorrent",
'rarfile',
'sftp',
'subliminal',
"telegram",
"transmission",
"all",
]
[tool.hatch.version]
path = "flexget/_version.py"
[tool.hatch.build]
skip-excluded-dirs = true
[tool.hatch.build.targets.sdist]
include = [
"/flexget",
"/scripts/build_locked_extras.py",
"/scripts/bundle_webui.py",
]
[tool.hatch.build.targets.wheel.hooks.custom]
# The webui will be bundled when the BUNDLE_WEBUI env variable is defined
path = "scripts/bundle_webui.py"
[tool.hatch.build.targets.wheel]
include = [
"/flexget",
]
[tool.ruff]
line-length = 99
extend-exclude = [ "flexget/ui" ]
preview = true
format.quote-style = "single"
lint.select = [ "ALL" ]
lint.ignore = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B904", # TODO
"BLE001", # blind-except
"C901", # complex-structure
"COM", # Ruff recommends against using this rule alongside the formatter.
"D100", # undocumented-public-module
"D101", # undocumented-public-class
"D102", # undocumented-public-method
"D103", # undocumented-public-function
"D104", # undocumented-public-package
"D105", # undocumented-magic-method
"D107", # undocumented-public-init
"D203", # Conflicting with other rules
"D213", # Conflicting with other rules
"D415", # Duplicate of D400
"DTZ", # flake8-datetimez
"E501", # TODO
"EM", # flake8-errmsg
"ERA001", # commented-out-code
"FBT", # flake8-boolean-trap
"FIX002", # We use "TODO" comments as a form of documentation
"FIX004", # We use "HACK" comments as a form of documentation
"INP001", # implicit-namespace-package
"N817", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4234#discussion_r1951605123
"N818", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4234#pullrequestreview-2610029402
"PERF203", # TODO: Remove this rule once Python 3.10 support is dropped.
"PLC0415", # TODO
"PLE1205", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/13390
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0915", # too-many-statements
"PLR1704", # redefined-argument-from-local
"PLR2004", # magic-value-comparison
"PLW0603", # global-statement
"PLW0642", # self-or-cls-assignment
"PLW2901", # redefined-loop-name
"PTH119", # TODO
"Q", # Ruff recommends against using this rule alongside the formatter.
"RUF012", # Maybe can re-enable after https://github.com/astral-sh/ruff/issues/5243
"S", # flake8-bandit
"SLF001", # private-member-access
"TD002", # Not applicable
"TD003", # Not applicable
"TRY003", # raise-vanilla-args
"TRY400", # Rejected by @gazpachoking in https://github.com/Flexget/Flexget/pull/4249#issuecomment-2656387500
]
lint.explicit-preview-rules = true
lint.per-file-ignores.'docs/scripts/*' = [ "T20" ]
lint.per-file-ignores.'scripts/*' = [ "T20" ]
lint.per-file-ignores.'tests/*' = [ "T20" ]
lint.per-file-ignores."flexget/*" = [ "PTH" ] # TODO
lint.flake8-type-checking.quote-annotations = true
lint.isort.known-first-party = [ 'flexget' ]
lint.future-annotations = true
[tool.pyproject-fmt]
max_supported_python = '3.14'
[tool.pytest.ini_options]
addopts = '-p no:legacypath --strict-markers'
filterwarnings = [
'error',
"ignore:jsonschema.RefResolver is deprecated as of v4.18.0:DeprecationWarning:flask_restx.api", # Can’t be fixed, consider migrating to `flask-smorest` to eliminate it. See https://github.com/python-restx/flask-restx/issues/633#issuecomment-2962412240
"ignore:'count' is passed as positional argument:DeprecationWarning:feedparser.html", # Can’t be fixed, feedparser is no longer maintained unless we migrate to an alternative library.
'ignore:tzname PST identified but not understood.:dateutil.parser._parser.UnknownTimezoneWarning:dateutil.parser._parser', # needs investigation, tests/test_input_sites.py::TestInputSites::test_apple_trailers_simple tests/test_input_sites.py::TestInputSites::test_apple_trailers
'ignore:tzname EDT identified but not understood.:dateutil.parser._parser.UnknownTimezoneWarning:dateutil.parser._parser', # needs investigation, tests/test_rss.py::TestRssOnline::test_rss_online
"ignore:unclosed file <_io.BufferedReader name=':ResourceWarning", # needs investigation, tests/api_tests/test_cached_api.py::TestCachedAPI::test_cached_api
'ignore:Failed to load HostKeys from:UserWarning:pysftp', # Can’t be fixed, https://stackoverflow.com/q/56521549 It's a bug in pysftp 0.2.9, not in 0.2.8
]
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',
]
testpaths = [ "tests" ]
xfail_strict = true
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING",
]
[tool.coverage.run]
branch = true
[tool.doc8]
ignore = [ "D004" ]
max_line_length = 99