Skip to content

Commit e35bfd5

Browse files
authored
TYP: fix mypy ignored error in pandas/tests/io/test_fsspec.py (#37797)
1 parent 850edc8 commit e35bfd5

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/tests/io/test_fsspec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
"dt": date_range("2018-06-18", periods=2),
2525
}
2626
)
27-
# the ignore on the following line accounts for to_csv returning Optional(str)
28-
# in general, but always str in the case we give no filename
29-
# error: Item "None" of "Optional[str]" has no attribute "encode"
30-
text = df1.to_csv(index=False).encode() # type: ignore[union-attr]
27+
text = str(df1.to_csv(index=False)).encode()
3128

3229

3330
@pytest.fixture

0 commit comments

Comments
 (0)