Skip to content

Commit 8dc5521

Browse files
committed
fix tests
1 parent bb9276c commit 8dc5521

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/subliminal/cli.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ def subliminal(
351351
debug: bool,
352352
logfile: os.PathLike[str] | None,
353353
logfile_level: str,
354+
addic7ed: tuple[str, str],
355+
opensubtitles: tuple[str, str],
356+
opensubtitlescom: tuple[str, str],
354357
**kwargs: Any,
355358
) -> None:
356359
"""Subtitles, faster than your thoughts."""
@@ -427,10 +430,14 @@ def subliminal(
427430
ctx.obj['refiner_configs'] = refiner_configs
428431

429432
# Deprecated options
430-
deprecated_options = ['addic7ed', 'opensubtitles', 'opensubtitlescom']
431-
for provider in deprecated_options:
432-
option_value = kwargs.get(provider)
433-
if option_value is not None:
433+
# To be remove in next version
434+
deprecated_options = {
435+
'addic7ed': addic7ed,
436+
'opensubtitles': opensubtitles,
437+
'opensubtitlescom': opensubtitlescom,
438+
}
439+
for provider, option_value in deprecated_options.items():
440+
if option_value is not None: # pragma: no cover
434441
msg = (
435442
f'option --{provider} is deprecated, use --provider.{provider}.username and '
436443
f'--provider.{provider}.password'

0 commit comments

Comments
 (0)