Skip to content

Commit 1592945

Browse files
authored
Cleanup after enabling strict default for test files (#15627)
1 parent 6cd8c00 commit 1592945

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

mypy/test/testcheck.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ def run_case_once(
128128
options.show_traceback = True
129129

130130
# Enable some options automatically based on test file name.
131-
if "optional" in testcase.file:
132-
options.strict_optional = True
133131
if "columns" in testcase.file:
134132
options.show_column_numbers = True
135133
if "errorcodes" in testcase.file:

test-data/unit/hacks.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ Due to historical reasons, test cases contain things that may appear
55
baffling without extra context. This file attempts to describe most of
66
them.
77

8-
Strict optional is disabled be default
9-
--------------------------------------
10-
11-
Strict optional checking is enabled in mypy by default, but test cases
12-
must enable it explicitly, either through `# flags: --strict-optional`
13-
or by including `optional` as a substring in your test file name.
14-
15-
The reason for this is that many test cases written before strict
16-
optional was implemented use the idiom `x = None # type: t`, and
17-
updating all of these test cases would take a lot of work.
18-
198
Dummy if statements to prevent redefinition
209
-------------------------------------------
2110

0 commit comments

Comments
 (0)