|
22 | 22 | """Classes and enums for documents in the Azure Cosmos database service.
|
23 | 23 | """
|
24 | 24 |
|
25 |
| -from typing import List, Optional, TYPE_CHECKING, Union, Dict, Any |
| 25 | +from typing import Optional, TYPE_CHECKING, Union |
26 | 26 |
|
27 | 27 | from typing_extensions import Literal, TypedDict
|
28 | 28 |
|
@@ -75,23 +75,23 @@ def __init__(self) -> None:
|
75 | 75 | self.ReservedDocumentStorageInMB: int = 0
|
76 | 76 | self.ProvisionedDocumentStorageInMB: int = 0
|
77 | 77 | self.ConsistencyPolicy: Optional[UserConsistencyPolicy] = None
|
78 |
| - self._WritableLocations: List[dict] = [] |
79 |
| - self._ReadableLocations: List[dict] = [] |
| 78 | + self._WritableLocations: list[dict[str, str]] = [] |
| 79 | + self._ReadableLocations: list[dict[str, str]] = [] |
80 | 80 | self._EnableMultipleWritableLocations = False
|
81 | 81 |
|
82 | 82 | @property
|
83 |
| - def WritableLocations(self) -> List[Dict[Any, Any]]: |
| 83 | + def WritableLocations(self) -> list[dict[str, str]]: |
84 | 84 | """The list of writable locations for a geo-replicated database account.
|
85 | 85 | :returns: List of writable locations for the database account.
|
86 |
| - :rtype: List[str] |
| 86 | + :rtype: list[dict[str, str]] |
87 | 87 | """
|
88 | 88 | return self._WritableLocations
|
89 | 89 |
|
90 | 90 | @property
|
91 |
| - def ReadableLocations(self) -> List[Dict[Any, Any]]: |
| 91 | + def ReadableLocations(self) -> list[dict[str, str]]: |
92 | 92 | """The list of readable locations for a geo-replicated database account.
|
93 | 93 | :returns: List of readable locations for the database account.
|
94 |
| - :rtype: List[str] |
| 94 | + :rtype: list[dict[str, str]] |
95 | 95 | """
|
96 | 96 | return self._ReadableLocations
|
97 | 97 |
|
@@ -307,14 +307,14 @@ class ConnectionPolicy: # pylint: disable=too-many-instance-attributes
|
307 | 307 | taking into consideration the order specified in PreferredLocations. The
|
308 | 308 | locations in this list are specified as the names of the azure Cosmos
|
309 | 309 | locations like, 'West US', 'East US', 'Central India' and so on.
|
310 |
| - :vartype PreferredLocations: List[str] |
| 310 | + :vartype PreferredLocations: list[str] |
311 | 311 | :ivar ExcludedLocations:
|
312 | 312 | Gets or sets the excluded locations for geo-replicated database
|
313 | 313 | accounts. When ExcludedLocations is non-empty, the client will skip this
|
314 | 314 | set of locations from the final location evaluation. The locations in
|
315 | 315 | this list are specified as the names of the azure Cosmos locations like,
|
316 | 316 | 'West US', 'East US', 'Central India' and so on.
|
317 |
| - :vartype ExcludedLocations: List[str] |
| 317 | + :vartype ExcludedLocations: list[str] |
318 | 318 | :ivar RetryOptions:
|
319 | 319 | Gets or sets the retry options to be applied to all requests when
|
320 | 320 | retrying.
|
@@ -359,16 +359,16 @@ def __init__(self) -> None:
|
359 | 359 | self.SSLConfiguration: Optional[SSLConfiguration] = None
|
360 | 360 | self.ProxyConfiguration: Optional[ProxyConfiguration] = None
|
361 | 361 | self.EnableEndpointDiscovery: bool = True
|
362 |
| - self.PreferredLocations: List[str] = [] |
363 |
| - self.ExcludedLocations: Optional[List[str]] = None |
| 362 | + self.PreferredLocations: list[str] = [] |
| 363 | + self.ExcludedLocations: Optional[list[str]] = None |
364 | 364 | self.RetryOptions: RetryOptions = RetryOptions()
|
365 | 365 | self.DisableSSLVerification: bool = False
|
366 | 366 | self.UseMultipleWriteLocations: bool = False
|
367 | 367 | self.ConnectionRetryConfiguration: Optional["ConnectionRetryPolicy"] = None
|
368 | 368 | self.ResponsePayloadOnWriteDisabled: bool = False
|
369 | 369 | self.RetryNonIdempotentWrites: bool = False
|
370 | 370 |
|
371 |
| - def override_dba_timeouts( |
| 371 | + def _override_dba_timeouts( |
372 | 372 | self,
|
373 | 373 | connection_timeout: Optional[int] = None,
|
374 | 374 | read_timeout: Optional[int] = None
|
|
0 commit comments