Skip to content

TYP: changed variable new_pd_index to final_pd_index #44500

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 3 commits into from
Nov 28, 2021
Merged
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
7 changes: 2 additions & 5 deletions pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2093,11 +2093,8 @@ def convert(self, values: np.ndarray, nan_rep, encoding: str, errors: str):
if "freq" in kwargs:
kwargs["freq"] = None
new_pd_index = factory(values, **kwargs)

# error: Incompatible types in assignment (expression has type
# "Union[ndarray, DatetimeIndex]", variable has type "Index")
new_pd_index = _set_tz(new_pd_index, self.tz) # type: ignore[assignment]
return new_pd_index, new_pd_index
final_pd_index = _set_tz(new_pd_index, self.tz)
return final_pd_index, final_pd_index

def take_data(self):
"""return the values"""
Expand Down