@@ -12,7 +12,6 @@ from typing import (
1212 overload ,
1313)
1414
15- from odf .opendocument import OpenDocument # pyright: ignore[reportMissingTypeStubs]
1615from openpyxl .workbook .workbook import Workbook
1716from pandas .core .frame import DataFrame
1817import pyxlsb .workbook # pyright: ignore[reportMissingTypeStubs]
@@ -35,6 +34,10 @@ from pandas._typing import (
3534 WriteExcelBuffer ,
3635)
3736
37+ from odf .opendocument import ( # pyright: ignore[reportMissingTypeStubs] # isort: skip
38+ OpenDocument , # pyright: ignore[reportUnknownVariableType]
39+ )
40+
3841@overload
3942def read_excel (
4043 io : (
@@ -49,9 +52,9 @@ def read_excel(
4952 sheet_name : list [IntStrT ],
5053 * ,
5154 header : int | Sequence [int ] | None = ...,
52- names : ListLikeHashable | None = ...,
55+ names : ListLikeHashable [ Hashable ] | None = ...,
5356 index_col : int | Sequence [int ] | str | None = ...,
54- usecols : str | UsecolsArgType = ...,
57+ usecols : str | UsecolsArgType [ Any ] = ...,
5558 dtype : str | Dtype | Mapping [str , str | Dtype ] | None = ...,
5659 engine : ExcelReadEngine | None = ...,
5760 converters : Mapping [int | str , Callable [[Any ], Any ]] | None = ...,
@@ -92,9 +95,9 @@ def read_excel(
9295 sheet_name : None ,
9396 * ,
9497 header : int | Sequence [int ] | None = ...,
95- names : ListLikeHashable | None = ...,
98+ names : ListLikeHashable [ Hashable ] | None = ...,
9699 index_col : int | Sequence [int ] | str | None = ...,
97- usecols : str | UsecolsArgType = ...,
100+ usecols : str | UsecolsArgType [ Any ] = ...,
98101 dtype : str | Dtype | Mapping [str , str | Dtype ] | None = ...,
99102 engine : ExcelReadEngine | None = ...,
100103 converters : Mapping [int | str , Callable [[Any ], Any ]] | None = ...,
@@ -136,9 +139,9 @@ def read_excel( # type: ignore[overload-cannot-match]
136139 sheet_name : list [int | str ],
137140 * ,
138141 header : int | Sequence [int ] | None = ...,
139- names : ListLikeHashable | None = ...,
142+ names : ListLikeHashable [ Hashable ] | None = ...,
140143 index_col : int | Sequence [int ] | str | None = ...,
141- usecols : str | UsecolsArgType = ...,
144+ usecols : str | UsecolsArgType [ Any ] = ...,
142145 dtype : str | Dtype | Mapping [str , str | Dtype ] | None = ...,
143146 engine : ExcelReadEngine | None = ...,
144147 converters : Mapping [int | str , Callable [[Any ], Any ]] | None = ...,
@@ -179,9 +182,9 @@ def read_excel(
179182 sheet_name : int | str = ...,
180183 * ,
181184 header : int | Sequence [int ] | None = ...,
182- names : ListLikeHashable | None = ...,
185+ names : ListLikeHashable [ Hashable ] | None = ...,
183186 index_col : int | Sequence [int ] | str | None = ...,
184- usecols : str | UsecolsArgType = ...,
187+ usecols : str | UsecolsArgType [ Any ] = ...,
185188 dtype : str | Dtype | Mapping [str , str | Dtype ] | None = ...,
186189 engine : ExcelReadEngine | None = ...,
187190 converters : Mapping [int | str , Callable [[Any ], Any ]] | None = ...,
@@ -261,9 +264,9 @@ class ExcelFile:
261264 self ,
262265 sheet_name : list [int | str ] | None ,
263266 header : int | Sequence [int ] | None = ...,
264- names : ListLikeHashable | None = ...,
267+ names : ListLikeHashable [ Hashable ] | None = ...,
265268 index_col : int | Sequence [int ] | None = ...,
266- usecols : str | UsecolsArgType = ...,
269+ usecols : str | UsecolsArgType [ Any ] = ...,
267270 converters : dict [int | str , Callable [[Any ], Any ]] | None = ...,
268271 true_values : Iterable [Hashable ] | None = ...,
269272 false_values : Iterable [Hashable ] | None = ...,
@@ -289,9 +292,9 @@ class ExcelFile:
289292 self ,
290293 sheet_name : int | str ,
291294 header : int | Sequence [int ] | None = ...,
292- names : ListLikeHashable | None = ...,
295+ names : ListLikeHashable [ Hashable ] | None = ...,
293296 index_col : int | Sequence [int ] | None = ...,
294- usecols : str | UsecolsArgType = ...,
297+ usecols : str | UsecolsArgType [ Any ] = ...,
295298 converters : dict [int | str , Callable [[Any ], Any ]] | None = ...,
296299 true_values : Iterable [Hashable ] | None = ...,
297300 false_values : Iterable [Hashable ] | None = ...,
0 commit comments