summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.pyi
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2021-08-31 08:26:20 -0600
committerGitHub <noreply@github.com>2021-08-31 08:26:20 -0600
commit0656fc493591be2200b0b0df5e14fb547aa4702f (patch)
treeb067648dccb3d19241f4fb4d6ce6c420d2401103 /numpy/testing/_private/utils.pyi
parent160ccdb79ec429e9bab1fabb549e1351ada956f0 (diff)
parent82396851773c37220b0ac543c51b7a896ea75d96 (diff)
downloadnumpy-0656fc493591be2200b0b0df5e14fb547aa4702f.tar.gz
Merge pull request #19802 from BvB93/pep-457
STY: Use the new PEP 457 positional-only syntax for typing
Diffstat (limited to 'numpy/testing/_private/utils.pyi')
-rw-r--r--numpy/testing/_private/utils.pyi23
1 files changed, 14 insertions, 9 deletions
diff --git a/numpy/testing/_private/utils.pyi b/numpy/testing/_private/utils.pyi
index ab5ca8784..26ce52e40 100644
--- a/numpy/testing/_private/utils.pyi
+++ b/numpy/testing/_private/utils.pyi
@@ -259,8 +259,9 @@ def raises(*args: Type[BaseException]) -> Callable[[_FT], _FT]: ...
@overload
def assert_raises( # type: ignore
- __expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
- __callable: Callable[..., Any],
+ expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
+ callable: Callable[..., Any],
+ /,
*args: Any,
**kwargs: Any,
) -> None: ...
@@ -273,9 +274,10 @@ def assert_raises(
@overload
def assert_raises_regex(
- __expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
- __expected_regex: str | bytes | Pattern[Any],
- __callable: Callable[..., Any],
+ expected_exception: Type[BaseException] | Tuple[Type[BaseException], ...],
+ expected_regex: str | bytes | Pattern[Any],
+ callable: Callable[..., Any],
+ /,
*args: Any,
**kwargs: Any,
) -> None: ...
@@ -339,8 +341,9 @@ def assert_warns(
) -> contextlib._GeneratorContextManager[None]: ...
@overload
def assert_warns(
- __warning_class: Type[Warning],
- __func: Callable[..., _T],
+ warning_class: Type[Warning],
+ func: Callable[..., _T],
+ /,
*args: Any,
**kwargs: Any,
) -> _T: ...
@@ -349,7 +352,8 @@ def assert_warns(
def assert_no_warnings() -> contextlib._GeneratorContextManager[None]: ...
@overload
def assert_no_warnings(
- __func: Callable[..., _T],
+ func: Callable[..., _T],
+ /,
*args: Any,
**kwargs: Any,
) -> _T: ...
@@ -386,7 +390,8 @@ def temppath(
def assert_no_gc_cycles() -> contextlib._GeneratorContextManager[None]: ...
@overload
def assert_no_gc_cycles(
- __func: Callable[..., Any],
+ func: Callable[..., Any],
+ /,
*args: Any,
**kwargs: Any,
) -> None: ...