Skip to content

Commit 27018ce

Browse files
committed
chore(mypy): Typings for test_plugin_helpers
1 parent b907890 commit 27018ce

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/fixtures/pluginsystem/partials/test_plugin_helpers.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
from typing import Iterable, Mapping, Union
1+
import typing as t
22

33
from tmuxp.plugin import TmuxpPlugin
44

55

6+
class Config(t.TypedDict):
7+
tmux_version: t.Optional[str]
8+
tmuxp_version: t.Optional[str]
9+
libtmux_version: t.Optional[str]
10+
11+
612
class MyTestTmuxpPlugin(TmuxpPlugin):
7-
def __init__(self, config: Mapping[str, Union[str, Iterable[str]]]) -> None:
13+
def __init__(self, config: Config) -> None:
814
assert isinstance(config, dict)
915
tmux_version = config.pop("tmux_version", None)
1016
libtmux_version = config.pop("libtmux_version", None)

0 commit comments

Comments
 (0)