Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve unittest.removeHandler in Python 2 #7055

Merged
merged 1 commit into from
Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion stdlib/@python2/unittest.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import datetime
import types
from abc import ABCMeta, abstractmethod
from typing import Any, Callable, Iterable, Iterator, Mapping, NoReturn, Pattern, Sequence, Text, TextIO, TypeVar, Union, overload
from typing_extensions import ParamSpec

_T = TypeVar("_T")
_FT = TypeVar("_FT")
_P = ParamSpec("_P")

_ExceptionType = Union[type[BaseException], tuple[type[BaseException], ...]]
_Regexp = Union[Text, Pattern[Text]]
Expand Down Expand Up @@ -251,7 +253,7 @@ def removeResult(result: TestResult) -> bool: ...
@overload
def removeHandler() -> None: ...
@overload
def removeHandler(function: Callable[..., Any]) -> Callable[..., Any]: ...
def removeHandler(function: Callable[_P, _T]) -> Callable[_P, _T]: ...

# private but occasionally used
util: types.ModuleType