Skip to content

Commit d036bb5

Browse files
committed
Resolving typing and docstring manual pre-commit errors
1 parent 6c17196 commit d036bb5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/io/excel/_base.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
as a dict of `DataFrame`
128128
* ``None``: All worksheets.
129129
130-
table_name: str, list of str, or None, default 0
130+
table_name : str, list of str, or None, default 0
131131
Strings are used for table_names that correspond to Excel Table names.
132132
Lists of strings are used to request multiple tables.
133133
Specify ``None`` to get all tables.
@@ -431,7 +431,7 @@ def read_excel(
431431
skipfooter: int = ...,
432432
storage_options: StorageOptions = ...,
433433
dtype_backend: DtypeBackend | lib.NoDefault = ...,
434-
) -> DataFrame | list[DataFrame]: ...
434+
) -> DataFrame | list[DataFrame] | dict[str, DataFrame]: ...
435435

436436

437437
@overload
@@ -472,7 +472,7 @@ def read_excel(
472472
skipfooter: int = ...,
473473
storage_options: StorageOptions = ...,
474474
dtype_backend: DtypeBackend | lib.NoDefault = ...,
475-
) -> dict[IntStrT, DataFrame]: ...
475+
) -> DataFrame | dict[IntStrT, DataFrame] | dict[str, DataFrame]: ...
476476

477477

478478
@doc(storage_options=_shared_docs["storage_options"])
@@ -482,7 +482,7 @@ def read_excel(
482482
sheet_name: str | int | list[IntStrT] | None = 0,
483483
*,
484484
# If sheet name and table name are specified -> Nested Dictionary of DataFrames
485-
table_name: str | int | list[str] | None = 0,
485+
table_name: str | list[str] | None = 0,
486486
header: int | Sequence[int] | None = 0,
487487
names: SequenceNotStr[Hashable] | range | None = None,
488488
index_col: int | str | Sequence[int] | None = None,
@@ -513,7 +513,7 @@ def read_excel(
513513
storage_options: StorageOptions | None = None,
514514
dtype_backend: DtypeBackend | lib.NoDefault = lib.no_default,
515515
engine_kwargs: dict | None = None,
516-
) -> DataFrame | dict[IntStrT, DataFrame]:
516+
) -> DataFrame | dict[IntStrT, DataFrame] | dict[str, DataFrame]:
517517
check_dtype_backend(dtype_backend)
518518
should_close = False
519519
if engine_kwargs is None:

pandas/io/excel/_openpyxl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ def _convert_cell(self, cell) -> Scalar:
606606
return cell.value
607607

608608
def get_sheet_data(
609-
self, sheet: Workbook.worksheets, file_rows_needed: int | None = None
609+
self, sheet, file_rows_needed: int | None = None
610610
) -> list[list[Scalar]]:
611611
if self.book.read_only:
612612
sheet.reset_dimensions()

0 commit comments

Comments
 (0)