@@ -17,7 +17,7 @@ AR_i8: _nt.Array[np.int64]
1717AR_f8 : _nt .Array [np .float64 ]
1818
1919bool_obj : bool
20- suppress_obj : np .testing .suppress_warnings
20+ suppress_obj : np .testing .suppress_warnings # pyright: ignore[reportDeprecated]
2121func : Callable [[], int ]
2222
2323class Test : ...
@@ -46,12 +46,12 @@ with np.testing.clear_and_catch_warnings(True) as c1:
4646with np .testing .clear_and_catch_warnings () as c2 :
4747 assert_type (c2 , None )
4848
49- assert_type (np .testing .suppress_warnings ("once" ), np .testing .suppress_warnings )
50- assert_type (np .testing .suppress_warnings ()(func ), Callable [[], int ])
49+ assert_type (np .testing .suppress_warnings ("once" ), np .testing .suppress_warnings ) # pyright: ignore[reportDeprecated]
50+ assert_type (np .testing .suppress_warnings ()(func ), Callable [[], int ]) # pyright: ignore[reportDeprecated]
5151assert_type (suppress_obj .filter (RuntimeWarning ), None )
5252assert_type (suppress_obj .record (RuntimeWarning ), list [warnings .WarningMessage ])
5353with suppress_obj as c3 :
54- assert_type (c3 , np .testing .suppress_warnings )
54+ assert_type (c3 , np .testing .suppress_warnings ) # pyright: ignore[reportDeprecated]
5555
5656assert_type (np .testing .verbose , int )
5757assert_type (np .testing .IS_PYPY , bool )
@@ -142,8 +142,8 @@ assert_type(np.testing.assert_array_almost_equal_nulp(AR_i8, AR_f8, nulp=2), Non
142142assert_type (np .testing .assert_array_max_ulp (AR_i8 , AR_f8 , maxulp = 2 ), _nt .Array [np .floating ])
143143assert_type (np .testing .assert_array_max_ulp (AR_i8 , AR_f8 , dtype = np .float32 ), _nt .Array [np .floating ])
144144
145- assert_type (np .testing .assert_warns (RuntimeWarning ), contextlib ._GeneratorContextManager [None ])
146- assert_type (np .testing .assert_warns (RuntimeWarning , func3 , 5 ), bool )
145+ assert_type (np .testing .assert_warns (RuntimeWarning ), contextlib ._GeneratorContextManager [None ]) # pyright: ignore[reportDeprecated]
146+ assert_type (np .testing .assert_warns (RuntimeWarning , func3 , 5 ), bool ) # pyright: ignore[reportDeprecated]
147147
148148assert_type (np .testing .assert_no_warnings (), contextlib ._GeneratorContextManager [None ])
149149assert_type (np .testing .assert_no_warnings (func3 , 5 ), bool )
0 commit comments