Add missing __slots__ to third-party packages (#15454)

This commit is contained in:
Semyon Moroz
2026-02-22 20:08:46 +01:00
committed by GitHub
parent 9a9cc1834d
commit b43fc8f6f3
11 changed files with 54 additions and 2 deletions
@@ -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
@@ -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: ...
@@ -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):
@@ -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