Skip to content

Commit cdd627f

Browse files
committed
remove _engine keyword altogether
1 parent ddcaad8 commit cdd627f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/io/excel/_xlrd.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ def __init__(self, filepath_or_buffer):
2828
raise ImportError(err_msg +
2929
". Current version " + xlrd.__VERSION__)
3030

31-
self._engine = xlrd
3231
super().__init__(filepath_or_buffer)
3332

3433
@property
@@ -37,12 +36,12 @@ def _workbook_class(self):
3736
return Book
3837

3938
def load_workbook(self, filepath_or_buffer):
40-
39+
from xlrd import open_workbook
4140
if isinstance(filepath_or_buffer, (BytesIO, BufferedReader)):
4241
data = filepath_or_buffer.read()
43-
return self._engine.open_workbook(file_contents=data)
42+
return open_workbook(file_contents=data)
4443
else:
45-
return self._engine.open_workbook(filepath_or_buffer)
44+
return open_workbook(filepath_or_buffer)
4645

4746
@property
4847
def sheet_names(self):

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ split_penalty_after_opening_bracket = 1000000
5757
split_penalty_logical_operator = 30
5858

5959
[tool:pytest]
60+
python_files = test_excel.py
6061
minversion = 4.0.2
6162
testpaths = pandas
6263
markers =

0 commit comments

Comments
 (0)