@@ -594,7 +594,7 @@ def tz(self) -> tzinfo | None:
594
594
595
595
Returns
596
596
-------
597
- datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None
597
+ zoneinfo.ZoneInfo,, datetime.tzinfo, pytz.tzinfo.BaseTZInfo, dateutil.tz.tz.tzfile, or None
598
598
Returns None when the array is tz-naive.
599
599
600
600
See Also
@@ -624,7 +624,7 @@ def tz(self) -> tzinfo | None:
624
624
... )
625
625
>>> idx.tz
626
626
datetime.timezone.utc
627
- """
627
+ """ # noqa: E501
628
628
# GH 18595
629
629
return getattr (self .dtype , "tz" , None )
630
630
@@ -863,7 +863,7 @@ def tz_convert(self, tz) -> Self:
863
863
864
864
Parameters
865
865
----------
866
- tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
866
+ tz : str, zoneinfo.ZoneInfo, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
867
867
Time zone for time. Corresponding timestamps would be converted
868
868
to this time zone of the Datetime Array/Index. A `tz` of None will
869
869
convert to UTC and remove the timezone information.
@@ -923,7 +923,7 @@ def tz_convert(self, tz) -> Self:
923
923
'2014-08-01 08:00:00',
924
924
'2014-08-01 09:00:00'],
925
925
dtype='datetime64[ns]', freq='h')
926
- """
926
+ """ # noqa: E501
927
927
tz = timezones .maybe_get_tz (tz )
928
928
929
929
if self .tz is None :
@@ -955,7 +955,7 @@ def tz_localize(
955
955
956
956
Parameters
957
957
----------
958
- tz : str, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
958
+ tz : str, zoneinfo.ZoneInfo,, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None
959
959
Time zone to convert timestamps to. Passing ``None`` will
960
960
remove the time zone information preserving local time.
961
961
ambiguous : 'infer', 'NaT', bool array, default 'raise'
@@ -1081,7 +1081,7 @@ def tz_localize(
1081
1081
0 2015-03-29 03:30:00+02:00
1082
1082
1 2015-03-29 03:30:00+02:00
1083
1083
dtype: datetime64[ns, Europe/Warsaw]
1084
- """
1084
+ """ # noqa: E501
1085
1085
nonexistent_options = ("raise" , "NaT" , "shift_forward" , "shift_backward" )
1086
1086
if nonexistent not in nonexistent_options and not isinstance (
1087
1087
nonexistent , timedelta
0 commit comments