Skip to content

Commit e2a0f10

Browse files
fangchenliJulianWgs
authored andcommitted
TYP: use type annotations in tzconversion.pyi (pandas-dev#41771)
1 parent 1a28d55 commit e2a0f10

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

pandas/_libs/tslibs/tzconversion.pyi

+4-10
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,18 @@ from datetime import (
22
timedelta,
33
tzinfo,
44
)
5-
from typing import (
6-
Iterable,
7-
Optional,
8-
Union,
9-
)
5+
from typing import Iterable
106

117
import numpy as np
128

139
def tz_convert_from_utc(
1410
vals: np.ndarray, # const int64_t[:]
1511
tz: tzinfo,
1612
) -> np.ndarray: ... # np.ndarray[np.int64]
17-
1813
def tz_convert_from_utc_single(val: np.int64, tz: tzinfo) -> np.int64: ...
19-
2014
def tz_localize_to_utc(
2115
vals: np.ndarray, # np.ndarray[np.int64]
22-
tz: Optional[tzinfo],
23-
ambiguous: Optional[Union[str, bool, Iterable[bool]]] = None,
24-
nonexistent: Optional[Union[str, timedelta, np.timedelta64]] = None,
16+
tz: tzinfo | None,
17+
ambiguous: str | bool | Iterable[bool] | None = None,
18+
nonexistent: str | timedelta | np.timedelta64 | None = None,
2519
) -> np.ndarray: ... # np.ndarray[np.int64]

0 commit comments

Comments
 (0)