Skip to content
Snippets Groups Projects

Refactor

Merged Mateusz Gniewkowski requested to merge refactor into master
Compare and
5 files
+ 36
13
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 9
3
@@ -11,6 +11,12 @@ def get_args():
description="LPMN CLI tool",
)
parser.add_argument(
"-v",
"--verbose",
help="If progress should be printed.",
action="store_true"
)
parser.add_argument(
"-i",
"--input",
@@ -31,10 +37,10 @@ def get_args():
def main():
"""Runs the program."""
args = get_args()
file_id = upload_file(args.input)
file_id = upload_file(file_path=args.input)
t = Task(args.lpmn)
output_file_id = t.run(file_id)
downloaded = download_file(output_file_id, args.output)
output_file_id = t.run(file_id=file_id, verbose=args.verbose)
downloaded = download_file(file_id=output_file_id, output_path=args.output)
print(f"Result saved to {downloaded}")