Skip to content

Commit 40fbc68

Browse files
do not use unknown in/out
1 parent 7aaac45 commit 40fbc68

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

acclimatise/cli_types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

acclimatise/model.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,18 +388,18 @@ def capital(self):
388388
int_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

405405
def infer_type(string) -> typing.Optional[cli_types.CliType]:

0 commit comments

Comments
 (0)