mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Add __slots__ to third-party packages using stubdefaulter (#14619)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from typing_extensions import Self
|
||||
|
||||
class weekday:
|
||||
__slots__ = ["weekday", "n"]
|
||||
def __init__(self, weekday: int, n: int | None = None) -> None: ...
|
||||
def __call__(self, n: int) -> Self: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
@@ -108,6 +108,7 @@ def parse(
|
||||
|
||||
class _tzparser:
|
||||
class _result(_resultbase):
|
||||
__slots__ = ["stdabbr", "stdoffset", "dstabbr", "dstoffset", "start", "end"]
|
||||
stdabbr: str | None
|
||||
stdoffset: int | None
|
||||
dstabbr: str | None
|
||||
@@ -116,6 +117,7 @@ class _tzparser:
|
||||
end: _attr
|
||||
|
||||
class _attr(_resultbase):
|
||||
__slots__ = ["month", "week", "weekday", "yday", "jyday", "day", "time"]
|
||||
month: int | None
|
||||
week: int | None
|
||||
weekday: int | None
|
||||
|
||||
@@ -112,6 +112,23 @@ class rrule(rrulebase):
|
||||
_RRule: TypeAlias = rrule
|
||||
|
||||
class _iterinfo:
|
||||
__slots__ = [
|
||||
"rrule",
|
||||
"lastyear",
|
||||
"lastmonth",
|
||||
"yearlen",
|
||||
"nextyearlen",
|
||||
"yearordinal",
|
||||
"yearweekday",
|
||||
"mmask",
|
||||
"mrange",
|
||||
"mdaymask",
|
||||
"nmdaymask",
|
||||
"wdaymask",
|
||||
"wnomask",
|
||||
"nwdaymask",
|
||||
"eastermask",
|
||||
]
|
||||
rrule: _RRule
|
||||
def __init__(self, rrule: _RRule) -> None: ...
|
||||
yearlen: int | None
|
||||
|
||||
@@ -56,6 +56,7 @@ class tzlocal(_tzinfo):
|
||||
__reduce__ = object.__reduce__
|
||||
|
||||
class _ttinfo:
|
||||
__slots__ = ["offset", "delta", "isdst", "abbr", "isstd", "isgmt", "dstoffset"]
|
||||
offset: float
|
||||
delta: timedelta
|
||||
isdst: bool
|
||||
|
||||
Reference in New Issue
Block a user