Skip to content

Commit a0a536d

Browse files
committed
Fix click argument issue
This seems to be raised because click.argument accepts click.Path as a type.
1 parent 1d77d69 commit a0a536d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tmuxp/cli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ def command_freeze(session_name, socket_name, socket_path):
720720
@cli.command(name='load', short_help='Load tmuxp workspaces.')
721721
@click.pass_context
722722
@click.argument(
723-
'config', click.Path(exists=True), nargs=-1, callback=scan_config_argument
723+
'config', type=click.Path(exists=True), nargs=-1, callback=scan_config_argument
724724
)
725725
@click.option('-S', 'socket_path', help='pass-through for tmux -S')
726726
@click.option('-L', 'socket_name', help='pass-through for tmux -L')
@@ -729,15 +729,15 @@ def command_freeze(session_name, socket_name, socket_path):
729729
'-d', 'detached', help='Load the session without attaching it', is_flag=True
730730
)
731731
@click.option(
732-
'-2',
733732
'colors',
733+
'-2',
734734
flag_value=256,
735735
default=True,
736736
help='Force tmux to assume the terminal supports 256 colours.',
737737
)
738738
@click.option(
739-
'-8',
740739
'colors',
740+
'-8',
741741
flag_value=88,
742742
help='Like -2, but indicates that the terminal supports 88 colours.',
743743
)
@@ -855,7 +855,7 @@ def import_config(configfile, importfunc):
855855
)
856856
@click.argument(
857857
'configfile',
858-
click.Path(exists=True),
858+
type=click.Path(exists=True),
859859
nargs=1,
860860
callback=_create_scan_config_argument(get_teamocil_dir),
861861
)
@@ -871,7 +871,7 @@ def command_import_teamocil(configfile):
871871
)
872872
@click.argument(
873873
'configfile',
874-
click.Path(exists=True),
874+
type=click.Path(exists=True),
875875
nargs=1,
876876
callback=_create_scan_config_argument(get_tmuxinator_dir),
877877
)
@@ -883,7 +883,7 @@ def command_import_tmuxinator(configfile):
883883

884884
@cli.command(name='convert')
885885
@click.argument(
886-
'config', click.Path(exists=True), nargs=1, callback=scan_config_argument
886+
'config', type=click.Path(exists=True), nargs=1, callback=scan_config_argument
887887
)
888888
def command_convert(config):
889889
"""Convert a tmuxp config between JSON and YAML."""

0 commit comments

Comments
 (0)