mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-04-29 02:04:39 +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] https://github.com/stub42/pytz/blob/2ed682a7c4079042f50975970fc4f503c8450058/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