Remove the option to pass None in warns()
This commit is contained in:
parent
dbe66d97b4
commit
24ad886b15
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue