Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Updated PartitionKeyType
  • Loading branch information
annatisch committed Feb 28, 2024
commit f42cd533686965ab56c31a17219f74f8a24dfe4d
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
from ._cosmos_http_logging_policy import CosmosHttpLoggingPolicy
from ._range_partition_resolver import RangePartitionResolver

PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]


class CredentialDict(TypedDict, total=False):
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/aio/_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# pylint: disable=protected-access, too-many-lines
# pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs

PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]


class ContainerProxy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
from .._range_partition_resolver import RangePartitionResolver


PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]
class CredentialDict(TypedDict, total=False):
masterKey: str
resourceTokens: Mapping[str, Any]
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-cosmos/azure/cosmos/aio/_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# pylint: disable=protected-access
# pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs

from typing import Any, Dict, List, Mapping, Union, Optional, Type, TYPE_CHECKING
from typing import Any, Dict, List, Mapping, Union, Optional, Type, Sequence, TYPE_CHECKING

from azure.core.async_paging import AsyncItemPaged
from azure.core.tracing.decorator_async import distributed_trace_async
Expand All @@ -39,7 +39,7 @@
from ._container import ContainerProxy


PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]


class ScriptsProxy:
Expand Down
2 changes: 1 addition & 1 deletion sdk/cosmos/azure-cosmos/azure/cosmos/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# pylint: disable=too-many-lines
# pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs

PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]


class ContainerProxy: # pylint: disable=too-many-public-methods
Expand Down
4 changes: 2 additions & 2 deletions sdk/cosmos/azure-cosmos/azure/cosmos/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"""Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service.
"""

from typing import Any, Dict, List, Mapping, Union, Optional, Type
from typing import Any, Dict, List, Mapping, Union, Optional, Type, Sequence

from azure.core.paging import ItemPaged
from azure.core.tracing.decorator import distributed_trace
Expand All @@ -34,7 +34,7 @@
# pylint: disable=protected-access
# pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs

PartitionKeyType = Union[str, int, float, bool, List[Union[str, int, float, bool]], Type[NonePartitionKeyValue]]
PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]]


class ScriptType:
Expand Down