File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,9 +79,9 @@ class CliFileSystemType(CliType):
7979 Takes a directory / file path
8080 """
8181
82- output : bool = None
82+ output : bool = False
8383 """
84- Indicator if it is input or output (None if unknown)
84+ Indicator if it is input or output
8585 """
8686
8787
Original file line number Diff line number Diff line change @@ -388,18 +388,18 @@ def capital(self):
388388int_num_re = re .compile (r"([+-]?[0-9]+)" , flags = re .IGNORECASE )
389389
390390
391- def distinguish_inout (string , cls ) -> cli_types .CliFileSystemType :
391+ def distinguish_inout (
392+ string , cls : typing .Type [cli_types .CliFileSystemType ]
393+ ) -> cli_types .CliFileSystemType :
392394 """
393395 distinguish input/output files/directories given a string
394396 """
395397 im = input_re .search (string )
396398 om = output_re .search (string )
397- if im and not om :
398- return cls (output = False )
399- elif not im and om :
399+ if not im and om :
400400 return cls (output = True )
401401 else :
402- return cls ()
402+ return cls (output = False )
403403
404404
405405def infer_type (string ) -> typing .Optional [cli_types .CliType ]:
You can’t perform that action at this time.
0 commit comments