File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change
1
+ """CLI for ``tmuxp convert`` subcommand."""
1
2
import argparse
2
3
import os
3
4
import pathlib
16
17
def create_convert_subparser (
17
18
parser : argparse .ArgumentParser ,
18
19
) -> argparse .ArgumentParser :
20
+ """Augment :class:`argparse.ArgumentParser` with ``convert`` subcommand."""
19
21
workspace_file = parser .add_argument (
20
22
dest = "workspace_file" ,
21
23
type = str ,
@@ -40,6 +42,8 @@ def create_convert_subparser(
40
42
41
43
42
44
class ConvertUnknownFileType (exc .TmuxpException ):
45
+ """Raise if tmuxp convert encounters an unknown filetype."""
46
+
43
47
def __init__ (self , ext : str , * args : object , ** kwargs : object ) -> None :
44
48
return super ().__init__ (
45
49
f"Unknown filetype: { ext } (valid: [.json, .yaml, .yml])"
@@ -51,7 +55,7 @@ def command_convert(
51
55
answer_yes : bool ,
52
56
parser : t .Optional [argparse .ArgumentParser ] = None ,
53
57
) -> None :
54
- """Convert a tmuxp config between JSON and YAML."""
58
+ """Entrypoint for ``tmuxp convert`` convert a tmuxp config between JSON and YAML."""
55
59
workspace_file = find_workspace_file (
56
60
workspace_file , workspace_dir = get_workspace_dir ()
57
61
)
You can’t perform that action at this time.
0 commit comments