Update Unused parameters in stubs/ (#9704)

* Update _Unused TypeAlias

* Update `object | None` params

* Replace unused `object` parameters with `Unused` alias
This commit is contained in:
Avasam
2023-02-21 23:52:52 -08:00
committed by GitHub
parent fbc092b4cd
commit 078c6a0958
33 changed files with 134 additions and 133 deletions
@@ -1,4 +1,5 @@
import datetime
from _typeshed import Unused
from collections.abc import Callable, Iterable, Sequence
from typing import Any, NoReturn
from typing_extensions import Literal, Self, TypeAlias
@@ -77,7 +78,7 @@ class Property(ModelAttribute):
indexed: bool | None = ...,
repeated: bool | None = ...,
required: bool | None = ...,
default: object | None = ...,
default: object = None,
choices: Iterable[object] | None = ...,
validator: Callable[[Property, Any], object] | None = ...,
verbose_name: str | None = ...,
@@ -153,7 +154,7 @@ class JsonProperty(BlobProperty):
indexed: bool | None = ...,
repeated: bool | None = ...,
required: bool | None = ...,
default: object | None = ...,
default: object = None,
choices: Iterable[object] | None = ...,
validator: Callable[[Property, Any], object] | None = ...,
verbose_name: str | None = ...,
@@ -423,7 +424,7 @@ def get_multi_async(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[type[tasklets_module.Future]]: ...
def get_multi(
keys: Sequence[type[key_module.Key]],
@@ -441,7 +442,7 @@ def get_multi(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[type[Model] | None]: ...
def put_multi_async(
entities: list[type[Model]],
@@ -456,7 +457,7 @@ def put_multi_async(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[tasklets_module.Future]: ...
def put_multi(
entities: list[Model],
@@ -471,7 +472,7 @@ def put_multi(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[key_module.Key]: ...
def delete_multi_async(
keys: list[key_module.Key],
@@ -486,7 +487,7 @@ def delete_multi_async(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[tasklets_module.Future]: ...
def delete_multi(
keys: Sequence[key_module.Key],
@@ -501,7 +502,7 @@ def delete_multi(
memcache_timeout: int | None = ...,
max_memcache_items: int | None = ...,
force_writes: bool | None = ...,
_options: object | None = ...,
_options: object = None,
) -> list[None]: ...
def get_indexes_async(**options: object) -> NoReturn: ...
def get_indexes(**options: object) -> NoReturn: ...
def get_indexes_async(**options: Unused) -> NoReturn: ...
def get_indexes(**options: Unused) -> NoReturn: ...