@@ -38,7 +38,7 @@ def pair_different_warnings(request):
3838
3939
4040def f ():
41- warnings .warn ("f1" , FutureWarning )
41+ warnings .warn ("f1" , FutureWarning ) # pdlint: ignore[warning_class]
4242 warnings .warn ("f2" , RuntimeWarning )
4343
4444
@@ -175,7 +175,7 @@ def test_match_multiple_warnings():
175175 # https://github.com/pandas-dev/pandas/issues/47829
176176 category = (FutureWarning , UserWarning )
177177 with tm .assert_produces_warning (category , match = r"^Match this" ):
178- warnings .warn ("Match this" , FutureWarning )
178+ warnings .warn ("Match this" , FutureWarning ) # pdlint: ignore[warning_class]
179179 warnings .warn ("Match this too" , UserWarning )
180180
181181
@@ -185,7 +185,7 @@ def test_must_match_multiple_warnings():
185185 msg = "Did not see expected warning of class 'UserWarning'"
186186 with pytest .raises (AssertionError , match = msg ):
187187 with tm .assert_produces_warning (category , match = r"^Match this" ):
188- warnings .warn ("Match this" , FutureWarning )
188+ warnings .warn ("Match this" , FutureWarning ) # pdlint: ignore[warning_class]
189189
190190
191191def test_must_match_multiple_warnings_messages ():
@@ -194,7 +194,7 @@ def test_must_match_multiple_warnings_messages():
194194 msg = r"The emitted warning messages are \[UserWarning\('Not this'\)\]"
195195 with pytest .raises (AssertionError , match = msg ):
196196 with tm .assert_produces_warning (category , match = r"^Match this" ):
197- warnings .warn ("Match this" , FutureWarning )
197+ warnings .warn ("Match this" , FutureWarning ) # pdlint: ignore[warning_class]
198198 warnings .warn ("Not this" , UserWarning )
199199
200200
@@ -204,7 +204,7 @@ def test_allow_partial_match_for_multiple_warnings():
204204 with tm .assert_produces_warning (
205205 category , match = r"^Match this" , must_find_all_warnings = False
206206 ):
207- warnings .warn ("Match this" , FutureWarning )
207+ warnings .warn ("Match this" , FutureWarning ) # pdlint: ignore[warning_class]
208208
209209
210210def test_allow_partial_match_for_multiple_warnings_messages ():
@@ -213,7 +213,7 @@ def test_allow_partial_match_for_multiple_warnings_messages():
213213 with tm .assert_produces_warning (
214214 category , match = r"^Match this" , must_find_all_warnings = False
215215 ):
216- warnings .warn ("Match this" , FutureWarning )
216+ warnings .warn ("Match this" , FutureWarning ) # pdlint: ignore[warning_class]
217217 warnings .warn ("Not this" , UserWarning )
218218
219219
@@ -250,13 +250,17 @@ def test_raises_during_exception():
250250
251251 with pytest .raises (AssertionError , match = msg ):
252252 with tm .assert_produces_warning (UserWarning ):
253- warnings .warn ("FutureWarning" , FutureWarning )
253+ warnings .warn (
254+ "FutureWarning" , FutureWarning
255+ ) # pdlint: ignore[warning_class]
254256 raise IndexError
255257
256258 msg = "Caused unexpected warning"
257259 with pytest .raises (AssertionError , match = msg ):
258260 with tm .assert_produces_warning (None ):
259- warnings .warn ("FutureWarning" , FutureWarning )
261+ warnings .warn (
262+ "FutureWarning" , FutureWarning
263+ ) # pdlint: ignore[warning_class]
260264 raise SystemError
261265
262266
@@ -267,5 +271,7 @@ def test_passes_during_exception():
267271
268272 with pytest .raises (ValueError , match = "Error" ):
269273 with tm .assert_produces_warning (FutureWarning , match = "FutureWarning" ):
270- warnings .warn ("FutureWarning" , FutureWarning )
274+ warnings .warn (
275+ "FutureWarning" , FutureWarning
276+ ) # pdlint: ignore[warning_class]
271277 raise ValueError ("Error" )
0 commit comments