From 05f5daf898ec0d1d9a3d05c1a4ca6f924a1c2023 Mon Sep 17 00:00:00 2001 From: Mikhaylov-yv Date: Fri, 13 Nov 2020 01:55:08 +0300 Subject: [PATCH] TYP: fix mypy ignored error in pandas/tests/io/test_fsspec.py --- pandas/tests/io/test_fsspec.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandas/tests/io/test_fsspec.py b/pandas/tests/io/test_fsspec.py index 666da677d702e..f8081a6a69e83 100644 --- a/pandas/tests/io/test_fsspec.py +++ b/pandas/tests/io/test_fsspec.py @@ -24,10 +24,7 @@ "dt": date_range("2018-06-18", periods=2), } ) -# the ignore on the following line accounts for to_csv returning Optional(str) -# in general, but always str in the case we give no filename -# error: Item "None" of "Optional[str]" has no attribute "encode" -text = df1.to_csv(index=False).encode() # type: ignore[union-attr] +text = str(df1.to_csv(index=False)).encode() @pytest.fixture