Remove the option to pass None in warns()

This commit is contained in:
Olga Matoula 2021-05-16 12:10:32 +01:00
parent dbe66d97b4
commit 24ad886b15
1 changed files with 3 additions and 5 deletions

View File

@ -84,7 +84,7 @@ def deprecated_call(
@overload
def warns(
expected_warning: Optional[Union[Type[Warning], Tuple[Type[Warning], ...]]] = ...,
expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]] = ...,
*,
match: Optional[Union[str, Pattern[str]]] = ...,
) -> "WarningsChecker":
@ -93,7 +93,7 @@ def warns(
@overload
def warns(
expected_warning: Optional[Union[Type[Warning], Tuple[Type[Warning], ...]]],
expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]],
func: Callable[..., T],
*args: Any,
**kwargs: Any,
@ -102,9 +102,7 @@ def warns(
def warns(
expected_warning: Optional[
Union[Type[Warning], Tuple[Type[Warning], ...]]
] = Warning,
expected_warning: Union[Type[Warning], Tuple[Type[Warning], ...]] = Warning,
*args: Any,
match: Optional[Union[str, Pattern[str]]] = None,
**kwargs: Any,