Skip to content

Commit

Permalink
use built-in version flag, revert to default behavior (#15)
Browse files Browse the repository at this point in the history
Signed-off-by: Eli Uriegas <[email protected]>
  • Loading branch information
seemethere authored Jan 27, 2024
1 parent a776f3e commit a8a69e9
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions torchfix/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def main() -> None:

parser.add_argument(
"path",
nargs="*",
nargs="+",
help=("Path to check/fix. Can be a directory, a file, or multiple of either."),
)
parser.add_argument(
Expand All @@ -38,8 +38,8 @@ def main() -> None:
)
parser.add_argument(
"--version",
action="store_true",
help="Print current version.",
action="version",
version=f"{TorchFixVersion}"
)

# XXX TODO: Get rid of this!
Expand All @@ -52,11 +52,6 @@ def main() -> None:

args = parser.parse_args()

if args.version:
# TODO: Perhaps add commit hash here if we can
print(f"{TorchFixVersion}")
sys.exit(0)

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

0 comments on commit a8a69e9

Please sign in to comment.