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
19 changes: 9 additions & 10 deletions stubs/google-cloud-ndb/google/cloud/ndb/_cache.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from _typeshed import Incomplete
from typing import Any

from google.cloud.ndb import tasklets as tasklets

Expand All @@ -13,11 +12,11 @@ class _GlobalCacheBatch:
def make_call(self) -> None: ...
def future_info(self, key) -> None: ...

global_get: Any
global_get: Incomplete

class _GlobalCacheGetBatch(_GlobalCacheBatch):
todo: Any
keys: Any
todo: Incomplete
keys: Incomplete
def __init__(self, ignore_options) -> None: ...
def add(self, key): ...
def done_callback(self, cache_call) -> None: ...
Expand All @@ -27,7 +26,7 @@ class _GlobalCacheGetBatch(_GlobalCacheBatch):
def global_set(key, value, expires: Incomplete | None = ..., read: bool = ...): ...

class _GlobalCacheSetBatch(_GlobalCacheBatch):
expires: Any
expires: Incomplete
todo: object
futures: object
def __init__(self, options) -> None: ...
Expand All @@ -41,17 +40,17 @@ class _GlobalCacheSetIfNotExistsBatch(_GlobalCacheSetBatch):
def make_call(self): ...
def future_info(self, key, value): ... # type:ignore[override]

global_delete: Any
global_delete: Incomplete

class _GlobalCacheDeleteBatch(_GlobalCacheBatch):
keys: Any
futures: Any
keys: Incomplete
futures: Incomplete
def __init__(self, ignore_options) -> None: ...
def add(self, key): ...
def make_call(self): ...
def future_info(self, key): ...

global_watch: Any
global_watch: Incomplete

class _GlobalCacheWatchBatch(_GlobalCacheDeleteBatch):
def make_call(self): ...
Expand All @@ -63,7 +62,7 @@ class _GlobalCacheUnwatchBatch(_GlobalCacheDeleteBatch):
def make_call(self): ...
def future_info(self, key): ...

global_compare_and_swap: Any
global_compare_and_swap: Incomplete

class _GlobalCacheCompareAndSwapBatch(_GlobalCacheSetBatch):
def make_call(self): ...
Expand Down
3 changes: 1 addition & 2 deletions stubs/google-cloud-ndb/google/cloud/ndb/_datastore_query.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from _typeshed import Incomplete
from typing import Any

class QueryIterator:
def __iter__(self): ...
Expand All @@ -14,7 +13,7 @@ class QueryIterator:
class Cursor:
@classmethod
def from_websafe_string(cls, urlsafe): ...
cursor: Any
cursor: Incomplete
def __init__(self, cursor: Incomplete | None = ..., urlsafe: Incomplete | None = ...) -> None: ...
def to_websafe_string(self): ...
def urlsafe(self): ...
Expand Down
21 changes: 11 additions & 10 deletions stubs/google-cloud-ndb/google/cloud/ndb/_eventloop.pyi
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
from typing import Any, NamedTuple
from _typeshed import Incomplete
from typing import NamedTuple

class _Event(NamedTuple):
when: Any
callback: Any
args: Any
kwargs: Any
when: Incomplete
callback: Incomplete
args: Incomplete
kwargs: Incomplete

class EventLoop:
current: Any
idlers: Any
current: Incomplete
idlers: Incomplete
inactive: int
queue: Any
rpcs: Any
rpc_results: Any
queue: Incomplete
rpcs: Incomplete
rpc_results: Incomplete
def __init__(self) -> None: ...
def clear(self) -> None: ...
def insort_event_right(self, event) -> None: ...
Expand Down
12 changes: 6 additions & 6 deletions stubs/google-cloud-ndb/google/cloud/ndb/blobstore.pyi
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from typing import Any
from _typeshed import Incomplete

from google.cloud.ndb import model

BlobKey: Any
BlobKey: Incomplete
BLOB_INFO_KIND: str
BLOB_MIGRATION_KIND: str
BLOB_KEY_HEADER: str
Expand Down Expand Up @@ -51,10 +51,10 @@ class Error:
def fetch_data(*args, **kwargs) -> None: ...
def fetch_data_async(*args, **kwargs) -> None: ...

get: Any
get_async: Any
get_multi: Any
get_multi_async: Any
get: Incomplete
get_async: Incomplete
get_multi: Incomplete
get_multi_async: Incomplete

class InternalError:
def __init__(self, *args, **kwargs) -> None: ...
Expand Down
42 changes: 21 additions & 21 deletions stubs/google-cloud-ndb/google/cloud/ndb/context.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import Incomplete
from collections.abc import Callable
from typing import Any, NamedTuple
from typing import NamedTuple

from google.cloud.ndb import Key, exceptions as exceptions

Expand All @@ -19,18 +19,18 @@ def get_context(raise_context_error: bool = ...): ...
def get_toplevel_context(raise_context_error: bool = ...): ...

class _ContextTuple(NamedTuple):
id: Any
client: Any
namespace: Any
eventloop: Any
batches: Any
commit_batches: Any
transaction: Any
cache: Any
global_cache: Any
on_commit_callbacks: Any
transaction_complete_callbacks: Any
legacy_data: Any
id: Incomplete
client: Incomplete
namespace: Incomplete
eventloop: Incomplete
batches: Incomplete
commit_batches: Incomplete
transaction: Incomplete
cache: Incomplete
global_cache: Incomplete
on_commit_callbacks: Incomplete
transaction_complete_callbacks: Incomplete
legacy_data: Incomplete

class _Context(_ContextTuple):
def __new__(
Expand Down Expand Up @@ -67,19 +67,19 @@ class Context(_Context):
def get_cache_policy(self): ...
def get_datastore_policy(self) -> None: ...
def get_global_cache_policy(self): ...
get_memcache_policy: Any
get_memcache_policy: Incomplete
def get_global_cache_timeout_policy(self): ...
get_memcache_timeout_policy: Any
cache_policy: Any
get_memcache_timeout_policy: Incomplete
cache_policy: Incomplete
def set_cache_policy(self, policy): ...
datastore_policy: Any
datastore_policy: Incomplete
def set_datastore_policy(self, policy): ...
global_cache_policy: Any
global_cache_policy: Incomplete
def set_global_cache_policy(self, policy): ...
set_memcache_policy: Any
global_cache_timeout_policy: Any
set_memcache_policy: Incomplete
global_cache_timeout_policy: Incomplete
def set_global_cache_timeout_policy(self, policy): ...
set_memcache_timeout_policy: Any
set_memcache_timeout_policy: Incomplete
def get_retry_state(self): ...
def set_retry_state(self, state) -> None: ...
def clear_retry_state(self) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/google-cloud-ndb/google/cloud/ndb/exceptions.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any
from _typeshed import Incomplete

class Error(Exception): ...

Expand All @@ -12,7 +12,7 @@ class Rollback(Error): ...
class BadQueryError(Error): ...

class BadFilterError(Error):
filter: Any
filter: Incomplete
def __init__(self, filter) -> None: ...

class NoLongerImplementedError(NotImplementedError):
Expand Down
27 changes: 13 additions & 14 deletions stubs/google-cloud-ndb/google/cloud/ndb/global_cache.pyi
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import abc
from _typeshed import Incomplete
from typing import Any
from typing_extensions import Self

ConnectionError: Any
ConnectionError: Incomplete

class GlobalCache(metaclass=abc.ABCMeta):
__metaclass__: Any
transient_errors: Any
__metaclass__: Incomplete
transient_errors: Incomplete
strict_read: bool
strict_write: bool
@abc.abstractmethod
Expand All @@ -26,7 +25,7 @@ class GlobalCache(metaclass=abc.ABCMeta):
def clear(self): ...

class _InProcessGlobalCache(GlobalCache):
cache: Any
cache: Incomplete
def __init__(self) -> None: ...
def get(self, keys): ...
def set(self, items, expires: Incomplete | None = ...) -> None: ...
Expand All @@ -37,12 +36,12 @@ class _InProcessGlobalCache(GlobalCache):
def clear(self) -> None: ...

class RedisCache(GlobalCache):
transient_errors: Any
transient_errors: Incomplete
@classmethod
def from_environment(cls, strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
redis: Any
strict_read: Any
strict_write: Any
redis: Incomplete
strict_read: Incomplete
strict_write: Incomplete
def __init__(self, redis, strict_read: bool = ..., strict_write: bool = ...) -> None: ...
@property
def pipes(self): ...
Expand All @@ -56,16 +55,16 @@ class RedisCache(GlobalCache):

class MemcacheCache(GlobalCache):
class KeyNotSet(Exception):
key: Any
key: Incomplete
def __init__(self, key) -> None: ...
def __eq__(self, other): ...

transient_errors: Any
transient_errors: Incomplete
@classmethod
def from_environment(cls, max_pool_size: int = ..., strict_read: bool = ..., strict_write: bool = ...) -> Self: ...
client: Any
strict_read: Any
strict_write: Any
client: Incomplete
strict_read: Incomplete
strict_write: Incomplete
def __init__(self, client, strict_read: bool = ..., strict_write: bool = ...) -> None: ...
@property
def caskeys(self): ...
Expand Down
5 changes: 2 additions & 3 deletions stubs/google-cloud-ndb/google/cloud/ndb/key.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from _typeshed import Incomplete
from typing import Any

UNDEFINED: Any
UNDEFINED: Incomplete

class Key:
def __new__(cls, *path_args, **kwargs): ...
Expand All @@ -17,7 +16,7 @@ class Key:
def root(self): ...
def namespace(self): ...
def project(self): ...
app: Any
app: Incomplete
def database(self) -> str | None: ...
def id(self): ...
def string_id(self): ...
Expand Down
3 changes: 1 addition & 2 deletions stubs/google-cloud-ndb/google/cloud/ndb/metadata.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from _typeshed import Incomplete
from typing import Any

from google.cloud.ndb import model

Expand Down Expand Up @@ -32,7 +31,7 @@ class Property(_BaseMetadata):
def property_name(self): ...
@property
def kind_name(self): ...
property_representation: Any
property_representation: Incomplete
@classmethod
def key_for_kind(cls, kind): ...
@classmethod
Expand Down
4 changes: 2 additions & 2 deletions stubs/google-cloud-ndb/google/cloud/ndb/polymodel.pyi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Any
from _typeshed import Incomplete

from google.cloud.ndb import model

class _ClassKeyProperty(model.StringProperty):
def __init__(self, name=..., indexed: bool = ...) -> None: ...

class PolyModel(model.Model):
class_: Any
class_: Incomplete
Loading