@@ -61,7 +61,6 @@ def get_utc_offset(tz, date: datetime.datetime = None) -> datetime.timedelta:
6161
6262 return date .replace (tzinfo = pytz .utc ).astimezone (tz ).utcoffset ()
6363
64-
6564 def get_timezone (tz : str , date : datetime .datetime = None ) -> datetime .timedelta :
6665 """
6766 Returns a localized :class:`pytz.timezone` object for the given date.
@@ -82,7 +81,6 @@ def get_timezone(tz: str, date: datetime.datetime = None) -> datetime.timedelta:
8281
8382 return pytz .timezone (tz ).localize (d ).tzinfo
8483
85-
8684 def current_tzinfo ():
8785 """
8886 Returns a tzinfo object for the current timezone
@@ -127,8 +125,9 @@ def set_timezone(obj, tzinfo):
127125
128126 return obj .replace (tzinfo = tzinfo )
129127
130-
131- def utc_timestamp_to_datetime (utc_timestamp : Union [float , int ], output_tz : datetime .tzinfo = None ) -> datetime .datetime :
128+ def utc_timestamp_to_datetime (
129+ utc_timestamp : Union [float , int ], output_tz : datetime .tzinfo = None
130+ ) -> datetime .datetime :
132131 """
133132 Convert UTC timestamp (seconds from UNIX epoch) to a :class:`datetime.datetime` object
134133
@@ -157,7 +156,6 @@ def utc_timestamp_to_datetime(utc_timestamp: Union[float, int], output_tz: datet
157156 new_datetime = datetime .datetime .fromtimestamp (utc_timestamp , output_tz )
158157 return new_datetime .astimezone (output_tz )
159158
160-
161159 # List of months and their 3-character shortcodes.
162160 months = OrderedDict (
163161 Jan = "January" ,
@@ -174,7 +172,6 @@ def utc_timestamp_to_datetime(utc_timestamp: Union[float, int], output_tz: datet
174172 Dec = "December" ,
175173 )
176174
177-
178175 def parse_month (month : Union [str , int ]) -> str :
179176 """
180177 Converts an integer or shorthand month into the full month name
@@ -200,7 +197,6 @@ def parse_month(month: Union[str, int]) -> str:
200197 else :
201198 raise ValueError ("Unrecognised month value" )
202199
203-
204200 def get_month_number (month : Union [str , int ]) -> int :
205201 """
206202 Returns the number of the given month. If ``month`` is already a
0 commit comments