We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 637979c commit f24a50aCopy full SHA for f24a50a
src/tmuxp/cli/convert.py
@@ -8,6 +8,11 @@
8
9
from .utils import prompt_yes_no
10
11
+if t.TYPE_CHECKING:
12
+ from typing_extensions import Literal
13
+
14
+ AllowedFileTypes = Literal["json", "yaml"]
15
16
17
def create_convert_subparser(
18
parser: argparse.ArgumentParser,
@@ -50,7 +55,7 @@ def command_convert(
50
55
51
56
_, ext = os.path.splitext(workspace_file)
52
57
ext = ext.lower()
53
- to_filetype: t.Literal["json", "yaml"]
58
+ to_filetype: "AllowedFileTypes"
54
59
if ext == ".json":
60
to_filetype = "yaml"
61
elif ext in [".yaml", ".yml"]:
0 commit comments