Skip to content

Commit

Permalink
- added --version;
Browse files Browse the repository at this point in the history
  • Loading branch information
jaltmayerpizzorno committed Oct 26, 2023
1 parent 4a6f6fa commit f53e49b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/slipcover/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import argparse

def main():
ap = argparse.ArgumentParser(prog='slipcover')
ap = argparse.ArgumentParser(prog='SlipCover')
ap.add_argument('--branch', action='store_true', help="measure both branch and line coverage")
ap.add_argument('--json', action='store_true', help="select JSON output")
ap.add_argument('--pretty-print', action='store_true', help="pretty-print JSON output")
Expand All @@ -39,6 +39,8 @@ def main():
ap.add_argument('--dis', action='store_true', help=argparse.SUPPRESS)
ap.add_argument('--debug', action='store_true', help=argparse.SUPPRESS)
ap.add_argument('--dont-wrap-pytest', action='store_true', help=argparse.SUPPRESS)
ap.add_argument('--version', action='version',
version=f"%(prog)s v{sc.VERSION} (Python {'.'.join(map(str, sys.version_info[:3]))})")

g = ap.add_mutually_exclusive_group(required=True)
g.add_argument('-m', dest='module', nargs=1, help="run given module as __main__")
Expand Down

0 comments on commit f53e49b

Please sign in to comment.