|
22 | 22 | """Create, read, update and delete and execute scripts in the Azure Cosmos DB SQL API service.
|
23 | 23 | """
|
24 | 24 |
|
25 |
| -from typing import Any, Dict, List, Mapping, Union, Optional |
| 25 | +from typing import Any, Dict, List, Mapping, Union, Optional, Type, Sequence |
26 | 26 |
|
27 | 27 | from azure.core.paging import ItemPaged
|
28 | 28 | from azure.core.tracing.decorator import distributed_trace
|
|
34 | 34 | # pylint: disable=protected-access
|
35 | 35 | # pylint: disable=missing-client-constructor-parameter-credential,missing-client-constructor-parameter-kwargs
|
36 | 36 |
|
| 37 | +PartitionKeyType = Union[str, int, float, bool, Sequence[Union[str, int, float, bool, None]], Type[NonePartitionKeyValue]] # pylint: disable=line-too-long |
| 38 | + |
37 | 39 |
|
38 | 40 | class ScriptType:
|
39 | 41 | StoredProcedure = "sprocs"
|
@@ -191,7 +193,7 @@ def delete_stored_procedure(self, sproc: Union[str, Mapping[str, Any]], **kwargs
|
191 | 193 | def execute_stored_procedure(
|
192 | 194 | self,
|
193 | 195 | sproc: Union[str, Mapping[str, Any]],
|
194 |
| - partition_key: Optional[Union[str, bool, int, float, List[Union[str, bool, int, float]]]] = None, |
| 196 | + partition_key: Optional[PartitionKeyType] = None, |
195 | 197 | params: Optional[List[Dict[str, Any]]] = None,
|
196 | 198 | enable_script_logging: Optional[bool] = None,
|
197 | 199 | **kwargs: Any
|
|
0 commit comments