Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions stubs/JACK-Client/jack/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ class RingBuffer:
def size(self) -> int: ...

class Status:
__slots__ = "_code"
def __init__(self, code: int) -> None: ...
@property
def failure(self) -> bool: ...
Expand Down Expand Up @@ -300,6 +301,7 @@ class Status:
def client_zombie(self) -> bool: ...

class TransportState:
__slots__ = "_code"
def __init__(self, code: int) -> None: ...
def __eq__(self, other: object) -> bool: ...
def __hash__(self) -> int: ...
Expand Down
6 changes: 5 additions & 1 deletion stubs/WebOb/webob/acceptparse.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,15 @@ _AcceptLanguageProperty: TypeAlias = AsymmetricPropertyWithDelete[
),
]

class AcceptOffer(NamedTuple):
@type_check_only
class _AcceptOffer(NamedTuple):
type: str
subtype: str
params: tuple[tuple[str, str], ...]

class AcceptOffer(_AcceptOffer):
__slots__ = ()

class Accept:
@classmethod
def parse(cls, value: str) -> Iterator[_ParsedAccept]: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/docutils/docutils/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class _VersionInfo(NamedTuple):
release: bool

class VersionInfo(_VersionInfo):
__slots__ = ()
def __new__(
cls, major: int = 0, minor: int = 0, micro: int = 0, releaselevel: str = "final", serial: int = 0, release: bool = True
) -> Self: ...
Expand Down
15 changes: 15 additions & 0 deletions stubs/google-cloud-ndb/google/cloud/ndb/_options.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
from _typeshed import Incomplete

class Options:
__slots__ = (
"retries",
"timeout",
"use_cache",
"use_global_cache",
"global_cache_timeout",
"use_datastore",
"force_writes",
"max_memcache_items",
"propagation",
"deadline",
"use_memcache",
"memcache_timeout",
)
@classmethod
def options(cls, wrapped, _disambiguate_from_model_properties: bool = ...): ...
@classmethod
Expand All @@ -12,4 +26,5 @@ class Options:
def items(self) -> None: ...

class ReadOptions(Options):
__slots__ = ("read_consistency", "read_policy", "transaction")
def __init__(self, config: Incomplete | None = ..., **kwargs) -> None: ...
1 change: 1 addition & 0 deletions stubs/google-cloud-ndb/google/cloud/ndb/model.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class BlobProperty(Property):
def __get__(self, entity: Model, unused_cls: type[Model] | None = ...) -> bytes | list[bytes] | None: ...

class CompressedTextProperty(BlobProperty):
__slots__ = ()
def __init__(self, *args, **kwargs) -> None: ...

class TextProperty(Property):
Expand Down
19 changes: 19 additions & 0 deletions stubs/google-cloud-ndb/google/cloud/ndb/query.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,25 @@ AND = ConjunctionNode
OR = DisjunctionNode

class QueryOptions(_options.ReadOptions):
__slots__ = (
"kind",
"ancestor",
"filters",
"order_by",
"orders",
"distinct_on",
"group_by",
"namespace",
"project",
"database",
"keys_only",
"limit",
"offset",
"start_cursor",
"end_cursor",
"projection",
"callback",
)
project: Incomplete
namespace: Incomplete
database: str | None
Expand Down
1 change: 1 addition & 0 deletions stubs/icalendar/icalendar/parser.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def unescape_list_or_string(val: list[str]) -> list[str]: ...
def unescape_list_or_string(val: str) -> str: ...

class Contentline(str):
__slots__ = ("strict",)
strict: bool
def __new__(cls, value: str | bytes, strict: bool = False, encoding: str = "utf-8") -> Self: ...
@classmethod
Expand Down
6 changes: 6 additions & 0 deletions stubs/icalendar/icalendar/prop.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class vBoolean(int):
def from_ical(cls, ical: ICAL_TYPE) -> bool: ...

class vText(str):
__slots__ = ("encoding", "params")
encoding: str
params: Parameters
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8", params: SupportsKeysAndGetItem[str, str] = {}) -> Self: ...
Expand All @@ -83,6 +84,7 @@ class vText(str):
RELTYPE: property

class vCalAddress(str):
__slots__ = ("params",)
params: Parameters
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8", params: SupportsKeysAndGetItem[str, str] = {}) -> Self: ...
def to_ical(self) -> bytes: ...
Expand Down Expand Up @@ -213,6 +215,7 @@ class vPeriod(TimeBase):
FBTYPE: property

class vWeekday(str):
__slots__ = ("params", "relative", "weekday")
week_days: Final[CaselessDict[int]]
weekday: Literal["SU", "MO", "TU", "WE", "TH", "FR", "SA"] | None
relative: int | None
Expand All @@ -223,6 +226,7 @@ class vWeekday(str):
def from_ical(cls, ical: ICAL_TYPE) -> Self: ...

class vFrequency(str):
__slots__ = ("params",)
frequencies: Final[CaselessDict[str]]
params: Parameters
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8", params: SupportsKeysAndGetItem[str, str] = {}) -> Self: ...
Expand Down Expand Up @@ -285,6 +289,7 @@ class vTime(TimeBase):
def from_ical(ical: ICAL_TYPE) -> datetime.time: ...

class vUri(str):
__slots__ = ("params",)
params: Parameters
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8", params: SupportsKeysAndGetItem[str, str] = {}) -> Self: ...
def to_ical(self) -> bytes: ...
Expand Down Expand Up @@ -313,6 +318,7 @@ class vUTCOffset:
def __hash__(self) -> int: ...

class vInline(str):
__slots__ = ("params",)
params: Parameters
def __new__(cls, value: ICAL_TYPE, encoding: str = "utf-8", params: SupportsKeysAndGetItem[str, str] = {}) -> Self: ...
def to_ical(self) -> bytes: ...
Expand Down
3 changes: 2 additions & 1 deletion stubs/pony/pony/orm/dbproviders/postgres.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class PGSchema(dbschema.DBSchema):
class PGTranslator(SQLTranslator):
dialect: ClassVar[str]

class PGValue(Value): ...
class PGValue(Value):
__slots__: list[str] = []

class PGSQLBuilder(SQLBuilder):
dialect: ClassVar[str]
Expand Down
1 change: 1 addition & 0 deletions stubs/psycopg2/psycopg2/_range.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ from psycopg2._psycopg import _type, connection, cursor
_T_co = TypeVar("_T_co", covariant=True)

class Range(Generic[_T_co]):
__slots__ = ("_lower", "_upper", "_bounds")
def __init__(
self, lower: _T_co | None = None, upper: _T_co | None = None, bounds: str = "[)", empty: bool = False
) -> None: ...
Expand Down
1 change: 1 addition & 0 deletions stubs/psycopg2/psycopg2/extras.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class DictCursor(DictCursorBase):
def __next__(self) -> DictRow: ... # type: ignore[override]

class DictRow(list[Any]):
__slots__ = ("_index",)
def __init__(self, cursor) -> None: ...
def __getitem__(self, x): ...
def __setitem__(self, x, v) -> None: ...
Expand Down