fix stdin link importing

This commit is contained in:
Nick Sweeting 2020-07-02 13:31:05 -04:00
parent f373df7bd4
commit 7c428f40c8

View file

@ -64,9 +64,14 @@ def run_subcommand(subcommand: str,
SUBCOMMANDS = list_subcommands()
class NotProvided:
pass
def main(args: Optional[List[str]]=NotProvided, stdin: Optional[IO]=NotProvided, pwd: Optional[str]=None) -> None:
args = sys.argv[1:] if args is NotProvided else args
stdin = sys.stdin if stdin is NotProvided else stdin
def main(args: Optional[List[str]]=None, stdin: Optional[IO]=None, pwd: Optional[str]=None) -> None:
args = sys.argv[1:] if args is None else args
subcommands = list_subcommands()
parser = argparse.ArgumentParser(
prog=__command__,