Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions mypy/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import os
from typing import Final

PYTHON2_VERSION: Final = (2, 7)

# Earliest fully supported Python 3.x version. Used as the default Python
# version in tests. Mypy wheels should be built starting with this version,
# and CI tests should be run on this version (and later versions).
Expand Down
8 changes: 0 additions & 8 deletions mypy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,14 +594,6 @@ def add_invertible_flag(
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="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(
"--platform",
action="store",
Expand Down
2 changes: 1 addition & 1 deletion mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ def parse_options(
options.force_union_syntax = True

# Allow custom python version to override testfile_pyversion.
if all(flag.split("=")[0] not in ["--python-version", "-2", "--py2"] for flag in flag_list):
if all(flag.split("=")[0] != "--python-version" for flag in flag_list):
options.python_version = testfile_pyversion(testcase.file)

if testcase.config.getoption("--mypy-verbose"):
Expand Down