Skip to content

Commit 16d27a2

Browse files
authored
stubtest: add --version (#12852)
Suggested in #12825 Co-authored-by: hauntsaninja <>
1 parent 205d256 commit 16d27a2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypy/stubtest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import mypy.modulefinder
2424
import mypy.state
2525
import mypy.types
26+
import mypy.version
2627
from mypy import nodes
2728
from mypy.config_parser import parse_config_file
2829
from mypy.options import Options
@@ -1471,6 +1472,9 @@ def parse_options(args: List[str]) -> argparse.Namespace:
14711472
parser.add_argument(
14721473
"--check-typeshed", action="store_true", help="Check all stdlib modules in typeshed"
14731474
)
1475+
parser.add_argument(
1476+
"--version", action="version", version="%(prog)s " + mypy.version.__version__
1477+
)
14741478

14751479
return parser.parse_args(args)
14761480

0 commit comments

Comments
 (0)