Skip to content

Commit

Permalink
Adding Optional annotation for output-file and replace os.mkdir with …
Browse files Browse the repository at this point in the history
…Path.mkdir.
  • Loading branch information
sergey-serebryakov committed Aug 18, 2023
1 parent 85fcd9c commit 7dab1a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mlcube/mlcube/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def inspect(
platform: str,
force: bool = False,
format_: str = "json",
output_file: str = None,
output_file: t.Optional[str] = None,
) -> None:
"""Return low-level information on MLCube objects."""
runner_cls, mlcube_config = parse_cli_args(
Expand All @@ -693,7 +693,7 @@ def inspect(
output_stream = sys.stdout
else:
dir_path = Path(output_file).resolve().parent
os.makedirs(dir_path, exist_ok=True)
dir_path.mkdir(parents=True, exist_ok=True)
output_stream = open(output_file, "w")

try:
Expand Down

0 comments on commit 7dab1a4

Please sign in to comment.