Skip to content

Commit f0c394a

Browse files
authored
Stubgen add --version (#17662)
1 parent 3da16bd commit f0c394a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypy/stubgen.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
import mypy.parse
5555
import mypy.traverser
5656
import mypy.util
57+
import mypy.version
5758
from mypy.build import build
5859
from mypy.errors import CompileError, Errors
5960
from mypy.find_sources import InvalidSourceList, create_source_list
@@ -1847,6 +1848,9 @@ def parse_options(args: list[str]) -> Options:
18471848
dest="files",
18481849
help="generate stubs for given files or directories",
18491850
)
1851+
parser.add_argument(
1852+
"--version", action="version", version="%(prog)s " + mypy.version.__version__
1853+
)
18501854

18511855
ns = parser.parse_args(args)
18521856

0 commit comments

Comments
 (0)