Skip to content

Commit

Permalink
to_datetime's utc is not documented to allow None
Browse files Browse the repository at this point in the history
  • Loading branch information
twoertwein committed Aug 5, 2023
1 parent 8957328 commit ffeb1f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pandas-stubs/core/tools/datetimes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def to_datetime(
errors: IgnoreRaise = ...,
dayfirst: bool = ...,
yearfirst: bool = ...,
utc: bool | None = ...,
utc: bool = ...,
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
Expand All @@ -57,7 +57,7 @@ def to_datetime(
errors: Literal["coerce"],
dayfirst: bool = ...,
yearfirst: bool = ...,
utc: bool | None = ...,
utc: bool = ...,
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
Expand All @@ -71,7 +71,7 @@ def to_datetime(
errors: IgnoreRaiseCoerce = ...,
dayfirst: bool = ...,
yearfirst: bool = ...,
utc: bool | None = ...,
utc: bool = ...,
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
Expand All @@ -92,7 +92,7 @@ def to_datetime(
errors: IgnoreRaiseCoerce = ...,
dayfirst: bool = ...,
yearfirst: bool = ...,
utc: bool | None = ...,
utc: bool = ...,
format: str | None = ...,
exact: bool = ...,
unit: str | None = ...,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_types_to_datetime() -> None:

r2: pd.Series = pd.to_datetime(df, unit="s", origin="unix")
r3: pd.Series = pd.to_datetime(
df, unit="ns", dayfirst=True, utc=None, format="%M:%D", exact=False
df, unit="ns", dayfirst=True, utc=False, format="%M:%D", exact=False
)
r4: pd.DatetimeIndex = pd.to_datetime(
[1, 2], unit="D", origin=pd.Timestamp("01/01/2000")
Expand Down

0 comments on commit ffeb1f4

Please sign in to comment.