Skip to content

TYP: Fix wrong type annotations in pytables #45028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2625,7 +2625,7 @@ def to_hdf(
min_itemsize: int | dict[str, int] | None = None,
nan_rep=None,
dropna: bool_t | None = None,
data_columns: bool_t | list[str] | None = None,
data_columns: Literal[True] | list[str] | None = None,
errors: str = "strict",
encoding: str = "UTF-8",
) -> None:
Expand Down
12 changes: 6 additions & 6 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
Any,
Callable,
Hashable,
Literal,
Sequence,
cast,
)
Expand Down Expand Up @@ -272,7 +273,7 @@ def to_hdf(
min_itemsize: int | dict[str, int] | None = None,
nan_rep=None,
dropna: bool | None = None,
data_columns: bool | list[str] | None = None,
data_columns: Literal[True] | list[str] | None = None,
errors: str = "strict",
encoding: str = "UTF-8",
) -> None:
Expand Down Expand Up @@ -1078,7 +1079,7 @@ def put(
complevel: int | None = None,
min_itemsize: int | dict[str, int] | None = None,
nan_rep=None,
data_columns: list[str] | None = None,
data_columns: Literal[True] | list[str] | None = None,
encoding=None,
errors: str = "strict",
track_times: bool = True,
Expand All @@ -1102,7 +1103,7 @@ def put(
subsets of the data.
append : bool, default False
This will force Table format, append the input data to the existing.
data_columns : list, default None
data_columns : list of columns or True, default None
List of columns to create as data columns, or True to use all columns.
See `here
<https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html#query-via-data-columns>`__.
Expand Down Expand Up @@ -1208,7 +1209,7 @@ def append(
chunksize=None,
expectedrows=None,
dropna: bool | None = None,
data_columns: list[str] | None = None,
data_columns: Literal[True] | list[str] | None = None,
encoding=None,
errors: str = "strict",
):
Expand Down Expand Up @@ -3263,8 +3264,7 @@ class Table(Fixed):
values_axes : a list of the columns which comprise the data of this
table
data_columns : a list of the columns that we are allowing indexing
(these become single columns in values_axes), or True to force all
columns
(these become single columns in values_axes)
nan_rep : the string to use for nan representations for string
objects
levels : the names of levels
Expand Down