Skip to content

Commit 07fade9

Browse files
committed
Cleanup temporary --overwrite-union-syntax flag
1 parent e2a5783 commit 07fade9

File tree

12 files changed

+0
-16
lines changed

12 files changed

+0
-16
lines changed

mypy/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -823,10 +823,6 @@ def add_invertible_flag(
823823
add_invertible_flag(
824824
"--force-union-syntax", default=False, help=argparse.SUPPRESS, group=none_group
825825
)
826-
# For internal use only! Will be removed once Mypy drops support for Python 3.9.
827-
add_invertible_flag(
828-
"--overwrite-union-syntax", default=False, help=argparse.SUPPRESS, group=none_group
829-
)
830826

831827
lint_group = parser.add_argument_group(
832828
title="Configuring warnings",

mypy/options.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,6 @@ def __init__(self) -> None:
413413
# Deprecated, Mypy only supports Python 3.9+
414414
self.force_uppercase_builtins = False
415415
self.force_union_syntax = False
416-
# Mypy internal use only! Set during test run.
417-
self.overwrite_union_syntax = False
418416

419417
# Sets custom output format
420418
self.output: str | None = None

mypy/test/helpers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ def parse_options(
357357
options = Options()
358358
options.error_summary = False
359359
options.hide_error_codes = True
360-
options.overwrite_union_syntax = True
361360

362361
# Allow custom python version to override testfile_pyversion.
363362
if all(flag.split("=")[0] != "--python-version" for flag in flag_list):

mypy/test/testcheck.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ def run_case_once(
136136
options = parse_options(original_program_text, testcase, incremental_step)
137137
options.use_builtins_fixtures = True
138138
options.show_traceback = True
139-
options.overwrite_union_syntax = True
140139

141140
if options.num_workers:
142141
options.fixed_format_cache = True

mypy/test/testcmdline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def test_python_cmdline(testcase: DataDrivenTestCase, step: int) -> None:
6060
args = parse_args(testcase.input[0])
6161
custom_cwd = parse_cwd(testcase.input[1]) if len(testcase.input) > 1 else None
6262
args.append("--show-traceback")
63-
args.append("--overwrite-union-syntax")
6463
if "--error-summary" not in args:
6564
args.append("--no-error-summary")
6665
if "--show-error-codes" not in args:

mypy/test/testfinegrained.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ def get_options(self, source: str, testcase: DataDrivenTestCase, build_cache: bo
152152
options.use_fine_grained_cache = self.use_cache and not build_cache
153153
options.cache_fine_grained = self.use_cache
154154
options.local_partial_types = True
155-
options.overwrite_union_syntax = True
156155
options.export_types = "inspect" in testcase.file
157156
# Treat empty bodies safely for these test cases.
158157
options.allow_empty_bodies = not testcase.name.endswith("_no_empty")

mypy/test/testmerge.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ def build(self, source: str, testcase: DataDrivenTestCase) -> BuildResult | None
102102
options.export_types = True
103103
options.show_traceback = True
104104
options.allow_empty_bodies = True
105-
options.overwrite_union_syntax = True
106105
main_path = os.path.join(test_temp_dir, "main")
107106

108107
self.str_conv.options = options

mypy/test/testparse.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def test_parser(testcase: DataDrivenTestCase) -> None:
3838
The argument contains the description of the test case.
3939
"""
4040
options = Options()
41-
options.overwrite_union_syntax = True
4241
options.hide_error_codes = True
4342

4443
if testcase.file.endswith("python310.test"):

mypy/test/testpythoneval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def test_python_evaluation(testcase: DataDrivenTestCase, cache_dir: str) -> None
5252
"--no-error-summary",
5353
"--hide-error-codes",
5454
"--allow-empty-bodies",
55-
"--overwrite-union-syntax",
5655
"--test-env", # Speeds up some checks
5756
]
5857
interpreter = python3_path

mypy/test/testsemanal.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ def get_semanal_options(program_text: str, testcase: DataDrivenTestCase) -> Opti
3838
options.semantic_analysis_only = True
3939
options.show_traceback = True
4040
options.python_version = PYTHON3_VERSION
41-
options.overwrite_union_syntax = True
4241
return options
4342

4443

0 commit comments

Comments
 (0)