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,16 @@ 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 (string , cls : typing . Type [ cli_types . CliFileSystemType ] ) -> cli_types .CliFileSystemType :
392392 """
393393 distinguish input/output files/directories given a string
394394 """
395395 im = input_re .search (string )
396396 om = output_re .search (string )
397- if im and not om :
398- return cls (output = False )
399- elif not im and om :
397+ if not im and om :
400398 return cls (output = True )
401399 else :
402- return cls ()
400+ return cls (output = False )
403401
404402
405403def infer_type (string ) -> typing .Optional [cli_types .CliType ]:
You can’t perform that action at this time.
0 commit comments