Skip to content

Commit 2611eed

Browse files
committed
chore(cli[convert]): Fix typings for python 3.7
1 parent 152b258 commit 2611eed

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tmuxp/cli/convert.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
from .utils import prompt_yes_no
1010

11+
if t.TYPE_CHECKING:
12+
from typing_extensions import Literal
13+
14+
AllowedFileTypes = Literal["json", "yaml"]
15+
1116

1217
def create_convert_subparser(
1318
parser: argparse.ArgumentParser,
@@ -50,7 +55,7 @@ def command_convert(
5055

5156
_, ext = os.path.splitext(workspace_file)
5257
ext = ext.lower()
53-
to_filetype: t.Literal["json", "yaml"]
58+
to_filetype: "AllowedFileTypes"
5459
if ext == ".json":
5560
to_filetype = "yaml"
5661
elif ext in [".yaml", ".yml"]:

0 commit comments

Comments
 (0)