mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Fix argument types of pytz.tzinfo.StaticTzInfo (#7184)
The argument is_dst of the functions StaticTzInfo.localize and
StaticTzInfo.normalize are ignored, and only present for compatibility with
DstTzInfo. The functions in DstTzInfo also accepts None, so for compatibility,
StaticTzInfo should accept them as well.
[^1] 2ed682a7c4/src/pytz/tzinfo.py (L112)
This commit is contained in:
@@ -19,8 +19,8 @@ class BaseTzInfo(datetime.tzinfo):
|
||||
|
||||
class StaticTzInfo(BaseTzInfo):
|
||||
def fromutc(self, dt: datetime.datetime) -> datetime.datetime: ...
|
||||
def localize(self, dt: datetime.datetime, is_dst: bool = ...) -> datetime.datetime: ...
|
||||
def normalize(self, dt: datetime.datetime, is_dst: bool = ...) -> datetime.datetime: ...
|
||||
def localize(self, dt: datetime.datetime, is_dst: bool | None = ...) -> datetime.datetime: ...
|
||||
def normalize(self, dt: datetime.datetime, is_dst: bool | None = ...) -> datetime.datetime: ...
|
||||
def tzname(self, dt: datetime.datetime | None, is_dst: bool | None = ...) -> str: ...
|
||||
def utcoffset(self, dt: datetime.datetime | None, is_dst: bool | None = ...) -> datetime.timedelta: ...
|
||||
def dst(self, dt: datetime.datetime | None, is_dst: bool | None = ...) -> datetime.timedelta: ...
|
||||
|
||||
Reference in New Issue
Block a user