Skip to content

Commit 28d54c9

Browse files
committed
chore(mypy): Add typing for plugin tests
1 parent 74145bf commit 28d54c9

File tree

1 file changed

+34
-0
lines changed
  • tests/fixtures/pluginsystem/partials

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
"""Internal, :const:`typing.TYPE_CHECKING` guarded :term:`type annotations <annotation>`
2+
3+
These are _not_ to be imported at runtime as `typing_extensions` is not
4+
bundled with tmuxp. Usage example:
5+
6+
>>> import typing as t
7+
8+
>>> if t.TYPE_CHECKING:
9+
... from tmuxp.fixtures.pluginsystem.partials._types import PluginConfigSchema
10+
...
11+
"""
12+
import typing as t
13+
14+
from typing_extensions import NotRequired, TypedDict
15+
16+
17+
class PluginTestConfigSchema(TypedDict):
18+
"""Same as PluginConfigSchema, but with tmux, libtmux, and tmuxp version"""
19+
20+
tmux_version: NotRequired[str]
21+
libtmux_version: NotRequired[str]
22+
tmuxp_version: NotRequired[str]
23+
24+
# Normal keys
25+
plugin_name: NotRequired[str]
26+
tmux_min_version: NotRequired[str]
27+
tmux_max_version: NotRequired[str]
28+
tmux_version_incompatible: NotRequired[t.List[str]]
29+
libtmux_min_version: NotRequired[str]
30+
libtmux_max_version: NotRequired[str]
31+
libtmux_version_incompatible: NotRequired[t.List[str]]
32+
tmuxp_min_version: NotRequired[str]
33+
tmuxp_max_version: NotRequired[str]
34+
tmuxp_version_incompatible: NotRequired[t.List[str]]

0 commit comments

Comments
 (0)