Skip to content

Commit ae7b7bb

Browse files
committed
Allow dependencies to be undefined for version_callback() and get_version_callback()
1 parent 2d5ed5e commit ae7b7bb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

consolekit/versions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import platform
3333
import sys
3434
import textwrap
35-
from typing import Any, Callable, List, Mapping, Union
35+
from typing import Any, Callable, Iterable, Mapping, Union
3636

3737
# 3rd party
3838
import click
@@ -44,7 +44,7 @@
4444

4545

4646
def get_formatted_versions(
47-
dependencies: Union[List[str], Mapping[str, str]],
47+
dependencies: Union[Iterable[str], Mapping[str, str]] = (),
4848
show_python: bool = True,
4949
show_platform: bool = True,
5050
) -> StringList:
@@ -79,7 +79,7 @@ def get_formatted_versions(
7979
def get_version_callback(
8080
tool_version: str,
8181
tool_name: str,
82-
dependencies: Union[List[str], Mapping[str, str]],
82+
dependencies: Union[Iterable[str], Mapping[str, str]] = (),
8383
) -> Callable[[click.Context, click.Option, int], Any]:
8484
"""
8585
Creates a callback for :class:`~.version_option`.

0 commit comments

Comments
 (0)