diff options
author | Bas van Beek <b.f.van.beek@vu.nl> | 2021-08-31 12:03:27 +0200 |
---|---|---|
committer | Bas van Beek <b.f.van.beek@vu.nl> | 2021-08-31 12:06:25 +0200 |
commit | 45e43d72494a993188d809ef676fe3648a79e7bf (patch) | |
tree | ec0ac1f971d1d60109cedae8ed07181c6119986f /numpy/testing/_private/utils.pyi | |
parent | b21ad7c5ee0cd76ea41bb519877804457d1776f8 (diff) | |
download | numpy-45e43d72494a993188d809ef676fe3648a79e7bf.tar.gz |
STY: Use the PEP 457 positional-only syntax in the stub files
Diffstat (limited to 'numpy/testing/_private/utils.pyi')
-rw-r--r-- | numpy/testing/_private/utils.pyi | 23 |
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: ... |