From 1338067b12a293fe32bfcf7ac04aa9d4e5d6c800 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Thu, 10 Aug 2023 23:07:23 +0200 Subject: [PATCH] fixes Signed-off-by: Anatoly Myachev --- modin/core/io/text/excel_dispatcher.py | 6 +++--- modin/pandas/test/test_io.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modin/core/io/text/excel_dispatcher.py b/modin/core/io/text/excel_dispatcher.py index 6e715ed3f3a..b9235abcae6 100644 --- a/modin/core/io/text/excel_dispatcher.py +++ b/modin/core/io/text/excel_dispatcher.py @@ -14,7 +14,7 @@ """Module houses `ExcelDispatcher` class, that is used for reading excel files.""" import os -from io import BytesIO, StringIO +from io import BytesIO import pandas import re @@ -63,7 +63,7 @@ def _read(cls, io, **kwargs): io = BytesIO(io) # isinstance(ExcelFile, os.PathLike) == True - if not isinstance(io, (str, os.PathLike, BytesIO, StringIO)) or isinstance( + if not isinstance(io, (str, os.PathLike, BytesIO)) or isinstance( io, (ExcelFile, pandas.ExcelFile) ): if isinstance(io, ExcelFile): @@ -71,7 +71,7 @@ def _read(cls, io, **kwargs): return cls.single_worker_read( io, reason="Modin only implements parallel `read_excel` the following types of `io`: " - + "str, os.PathLike, io.BytesIO, io.StringIO.", + + "str, os.PathLike, io.BytesIO.", **kwargs ) diff --git a/modin/pandas/test/test_io.py b/modin/pandas/test/test_io.py index 716764295a9..6c586469e73 100644 --- a/modin/pandas/test/test_io.py +++ b/modin/pandas/test/test_io.py @@ -2102,7 +2102,7 @@ def test_ExcelFile_bytes(self, make_excel_file): df_equals(modin_excel_file.parse(), pandas_excel_file.parse()) assert isinstance(modin_excel_file, pd.ExcelFile) - def test_read_excel_from_ExcelFile(self, make_excel_file): + def test_read_excel_ExcelFile(self, make_excel_file): unique_filename = make_excel_file() with open(unique_filename, mode="rb") as f: content = f.read() @@ -2113,7 +2113,7 @@ def test_read_excel_from_ExcelFile(self, make_excel_file): df_equals(pd.read_excel(modin_excel_file), pandas.read_excel(pandas_excel_file)) @pytest.mark.parametrize("use_bytes_io", [False, True]) - def test_read_excel_from_bytes(self, use_bytes_io, make_excel_file): + def test_read_excel_bytes(self, use_bytes_io, make_excel_file): unique_filename = make_excel_file() with open(unique_filename, mode="rb") as f: io_bytes = f.read() @@ -2127,7 +2127,7 @@ def test_read_excel_from_bytes(self, use_bytes_io, make_excel_file): io=io_bytes, ) - def test_read_excel_from_file_handle(self, make_excel_file): + def test_read_excel_file_handle(self, make_excel_file): unique_filename = make_excel_file() with open(unique_filename, mode="rb") as f: eval_io(