Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
getzze committed Oct 22, 2024
1 parent 090cc85 commit 7020cf9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions subliminal/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ def decorator(f: Callable) -> Callable:
PROVIDERS_OPTIONS_CLI_TEMPLATE.format(ext=group_name, plugin=plugin_name, key=name),
PROVIDERS_OPTIONS_TEMPLATE.format(ext=group_name, plugin=plugin_name, key=name),
)
# Setting the default value also decides on the type
attrs = {
'default': opt['default'],
'help': opt['desc'],
Expand All @@ -232,7 +233,7 @@ def decorator(f: Callable) -> Callable:
key=name.upper(),
),
}
click_option(*param_decls, **attrs)(f)
f = click_option(*param_decls, **attrs)(f) # type: ignore[operator]
return f

return decorator
Expand Down Expand Up @@ -290,6 +291,7 @@ def decorator(f: Callable) -> Callable:
@click.pass_context
def subliminal(
ctx: click.Context,
/,
cache_dir: str,
debug: bool,
**kwargs: Any,
Expand Down Expand Up @@ -323,8 +325,8 @@ def subliminal(
ctx.obj['debug'] = debug

# create provider and refiner configs
provider_configs = {}
refiner_configs = {}
provider_configs: dict[str, dict[str, Any]] = {}
refiner_configs: dict[str, dict[str, Any]] = {}

for k, v in kwargs.items():
try_split = k.split('__')
Expand Down

0 comments on commit 7020cf9

Please sign in to comment.