mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-08-02 14:10:23 +08:00
Add missing __slots__ to third-party packages (#15454)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user