File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ def map_input(input_source: str) -> BinaryIO:
88 """Maps input source to stdin or to the file path"""
99
1010 if input_source is None :
11- return stdin .buffer
11+ return BytesIO ( stdin .buffer . read ())
1212
1313 with open (input_source , mode = 'rb' , buffering = 16384 ) as file :
1414 return BytesIO (file .read ())
Original file line number Diff line number Diff line change @@ -14,13 +14,15 @@ def get_parser() -> ArgumentParser:
1414
1515 parser = ArgumentParser (prog = 'PROG' ,
1616 description = 'Image CLI that performs different image operations like scaling, rotating etc' )
17- parser .add_argument ('input' ,
17+ parser .add_argument ('-- input' , '-i ' ,
1818 nargs = '?' ,
1919 default = None ,
20+ dest = 'input' ,
2021 help = 'program input' )
21- parser .add_argument ('output' ,
22+ parser .add_argument ('-- output' , '-o ' ,
2223 nargs = '?' ,
2324 default = None ,
25+ dest = 'output' ,
2426 help = 'program output' )
2527 parser .add_argument ('--output-format' ,
2628 nargs = '?' ,
You can’t perform that action at this time.
0 commit comments