Skip to content

Commit 83d0aa9

Browse files
committed
chore(mypy): Add typings for cli/import_config
1 parent 7d6be7e commit 83d0aa9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/tmuxp/cli/import_config.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def command_import(
5959
workspace_file: str,
6060
print_list: str,
6161
parser: argparse.ArgumentParser,
62-
):
62+
) -> None:
6363
"""Import a teamocil/tmuxinator config."""
6464

6565

@@ -116,9 +116,14 @@ def create_import_subparser(
116116
return parser
117117

118118

119+
class ImportConfigFn(t.Protocol):
120+
def __call__(self, workspace_dict: t.Dict[str, t.Any]) -> t.Dict[str, t.Any]:
121+
...
122+
123+
119124
def import_config(
120125
workspace_file: str,
121-
importfunc: t.Callable,
126+
importfunc: ImportConfigFn,
122127
parser: t.Optional[argparse.ArgumentParser] = None,
123128
) -> None:
124129
existing_workspace_file = ConfigReader._from_file(pathlib.Path(workspace_file))

0 commit comments

Comments
 (0)