10000 Remove `--py2` argument (#15670) · python/mypy@1958cb6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1958cb6

Browse files
authored
Remove --py2 argument (#15670)
1 parent a538cc9 commit 1958cb6

File tree

3 files changed

+1
-11
lines changed

3 files changed

+1
-11
lines changed

mypy/defaults.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import os
44
from typing import Final
55

6-
PYTHON2_VERSION: Final = (2, 7)
7-
86
# Earliest fully supported Python 3.x version. Used as the default Python
97
# version in tests. Mypy wheels should be built starting with this version,
108
# and CI tests should be run on this version (and later versions).

mypy/main.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -594,14 +594,6 @@ def add_invertible_flag(
594594
help="Type check code assuming it will be running on Python x.y",
595595
dest="special-opts:python_version",
596596
)
597-
platform_group.add_argument(
598-
"-2",
599-
"--py2",
600-
dest="special-opts:python_version",
601-
action="store_const",
602-
const=defaults.PYTHON2_VERSION,
603-
help="Use Python 2 mode (same as --python-version 2.7)",
604-
)
605597
platform_group.add_argument(
606598
"--platform",
607599
action="store",

mypy/test/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def parse_options(
345345
options.force_union_syntax = True
346346

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

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

0 commit comments

Comments
 (0)
0