Skip to content

Commit

Permalink
args.path is never not set
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrugman committed Sep 3, 2024
1 parent cefe3ee commit c1f163c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions torchfix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def StderrSilencer(redirect: bool = True):
libc.close(orig_stderr)


def main() -> None:
def _parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()

parser.add_argument(
Expand Down Expand Up @@ -78,11 +78,11 @@ def main() -> None:
action="store_true",
)

args = parser.parse_args()
return parser.parse_args()

if not args.path:
parser.print_usage()
sys.exit(1)

def main() -> None:
args = _parse_args()

files = codemod.gather_files(args.path)

Expand Down

0 comments on commit c1f163c

Please sign in to comment.