Skip to content

Commit 69c0f76

Browse files
committed
fix dialect issue for pyright
1 parent a01c099 commit 69c0f76

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/io/parsers/readers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1834,10 +1834,8 @@ def _extract_dialect(kwds: dict[str, Any]) -> csv.Dialect | None:
18341834
dialect = csv.get_dialect(dialect)
18351835

18361836
_validate_dialect(dialect)
1837-
# For pyright, _validate_dialect makes sure it is a dialect
1838-
assert isinstance(dialect, csv.Dialect)
18391837

1840-
return dialect
1838+
return dialect # pyright: ignore[reportReturnType]
18411839

18421840

18431841
MANDATORY_DIALECT_ATTRS = (

0 commit comments

Comments
 (0)