Skip to content

Commit

Permalink
Use return value
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- authored May 3, 2024
1 parent 0ddc519 commit 426ecf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/core/column/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ def tz_localize(

if tz is None:
return self.copy()
check_ambiguous_and_nonexistent(ambiguous, nonexistent)
ambiguous, nonexistent = check_ambiguous_and_nonexistent(ambiguous, nonexistent)
dtype = pd.DatetimeTZDtype(self.time_unit, tz)
ambiguous_col, nonexistent_col = self._find_ambiguous_and_nonexistent(
tz
Expand Down Expand Up @@ -886,7 +886,7 @@ def tz_localize(self, tz: str | None, ambiguous="NaT", nonexistent="NaT"):

if tz is None:
return self._local_time
check_ambiguous_and_nonexistent(ambiguous, nonexistent)
ambiguous, nonexistent = check_ambiguous_and_nonexistent(ambiguous, nonexistent)
raise ValueError(
"Already localized. "
"Use `tz_convert` to convert between time zones."
Expand Down

0 comments on commit 426ecf7

Please sign in to comment.