diff --git a/mypy/main.py b/mypy/main.py index 849ba56421dd..3e203b650c58 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -461,7 +461,7 @@ def add_invertible_flag(flag: str, help='Type check code assuming it will be running on Python x.y', dest='special-opts:python_version') platform_group.add_argument( - '-2', '--py2', dest='python_version', action='store_const', + '-2', '--py2', dest='special-opts:python_version', action='store_const', const=defaults.PYTHON2_VERSION, help="Use Python 2 mode (same as --python-version 2.7)") platform_group.add_argument(