Skip to content

Commit 4c7d329

Browse files
committed
Special-case TypedDict DeprecationWarning
1 parent 11ac78a commit 4c7d329

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_pytest_mypy.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ def test_mypy_encoding_warnings(testdir, monkeypatch):
8181
mypy_status_check = 1
8282
mypy_checks = mypy_file_checks + mypy_status_check
8383
expected_warnings = 2 # https://github.com/python/mypy/issues/14603
84+
if MYPY_VERSION < Version("1.5"):
85+
# DeprecationWarning: mypy_extensions.TypedDict is deprecated,
86+
# and will be removed in a future version.
87+
# Use typing.TypedDict or typing_extensions.TypedDict instead.
88+
# https://github.com/python/mypy/pull/15494
89+
expected_warnings += 1
8490
result.assert_outcomes(passed=mypy_checks, warnings=expected_warnings)
8591

8692

0 commit comments

Comments
 (0)