Skip to content

Commit 37e9cb4

Browse files
committed
lint
1 parent 81ade3d commit 37e9cb4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

py-polars/tests/unit/test_errors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
from tests.unit.conftest import TEMPORAL_DTYPES
2525

2626
if TYPE_CHECKING:
27+
from warnings import WarningMessage
28+
2729
from polars._typing import ConcatMethod
2830

2931

@@ -630,7 +632,7 @@ def test_invalid_is_in_dtypes(
630632
colname: str,
631633
values: list[Any],
632634
expected: list[Any] | None,
633-
warnings: list[Warning, str] | None,
635+
warnings: list[tuple[WarningMessage, str]] | None,
634636
) -> None:
635637
df = pl.DataFrame(
636638
{
@@ -658,7 +660,9 @@ def test_invalid_is_in_dtypes(
658660
assert len(records) == len(warnings)
659661
for record, expected_warning in zip(records, warnings, strict=True):
660662
assert record.category == expected_warning[0] # warning type
661-
assert record.message.args[0] == expected_warning[1] # warning message
663+
assert (
664+
record.message.args[0] == expected_warning[1] # type: ignore[union-attr]
665+
)
662666

663667
else:
664668
assert (

0 commit comments

Comments
 (0)