DefaultDict -> defaultdict, typing.ContextManager -> contextlib.AbstractContextManager (#6351)

This commit is contained in:
Alex Waygood
2021-11-21 15:07:35 +00:00
committed by GitHub
parent 5b668419ae
commit dc5f6410a8
3 changed files with 8 additions and 7 deletions

View File

@@ -4,13 +4,13 @@ import sys
import unittest.result
from _typeshed import Self
from collections.abc import Set # equivalent to typing.AbstractSet, not builtins.set
from contextlib import AbstractContextManager
from types import TracebackType
from typing import (
Any,
AnyStr,
Callable,
Container,
ContextManager,
Generic,
Iterable,
Mapping,
@@ -61,7 +61,7 @@ class TestCase:
def run(self, result: unittest.result.TestResult | None = ...) -> unittest.result.TestResult | None: ...
def __call__(self, result: unittest.result.TestResult | None = ...) -> unittest.result.TestResult | None: ...
def skipTest(self, reason: Any) -> None: ...
def subTest(self, msg: Any = ..., **params: Any) -> ContextManager[None]: ...
def subTest(self, msg: Any = ..., **params: Any) -> AbstractContextManager[None]: ...
def debug(self) -> None: ...
def _addSkip(self, result: unittest.result.TestResult, test_case: TestCase, reason: str) -> None: ...
def assertEqual(self, first: Any, second: Any, msg: Any = ...) -> None: ...