Skip to content

Commit

Permalink
Cleanup after enabling strict default for test files (#15627)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdce8p committed Jul 8, 2023
1 parent 6cd8c00 commit 1592945
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions mypy/test/testcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ def run_case_once(
options.show_traceback = True

# Enable some options automatically based on test file name.
if "optional" in testcase.file:
options.strict_optional = True
if "columns" in testcase.file:
options.show_column_numbers = True
if "errorcodes" in testcase.file:
Expand Down
11 changes: 0 additions & 11 deletions test-data/unit/hacks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,6 @@ Due to historical reasons, test cases contain things that may appear
baffling without extra context. This file attempts to describe most of
them.

Strict optional is disabled be default
--------------------------------------

Strict optional checking is enabled in mypy by default, but test cases
must enable it explicitly, either through `# flags: --strict-optional`
or by including `optional` as a substring in your test file name.

The reason for this is that many test cases written before strict
optional was implemented use the idiom `x = None # type: t`, and
updating all of these test cases would take a lot of work.

Dummy if statements to prevent redefinition
-------------------------------------------

Expand Down

0 comments on commit 1592945

Please sign in to comment.