azure-storage-blob 12.24.0b1__py3-none-any.whl → 12.25.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. azure/storage/blob/_blob_client.py +6 -3
  2. azure/storage/blob/_download.py +2 -2
  3. azure/storage/blob/_generated/__init__.py +9 -3
  4. azure/storage/blob/_generated/_configuration.py +1 -1
  5. azure/storage/blob/_generated/_patch.py +16 -29
  6. azure/storage/blob/_generated/_serialization.py +52 -117
  7. azure/storage/blob/_generated/aio/__init__.py +9 -3
  8. azure/storage/blob/_generated/aio/_configuration.py +1 -1
  9. azure/storage/blob/_generated/aio/_patch.py +16 -29
  10. azure/storage/blob/_generated/aio/operations/__init__.py +14 -8
  11. azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +17 -15
  12. azure/storage/blob/_generated/aio/operations/_blob_operations.py +55 -52
  13. azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +21 -18
  14. azure/storage/blob/_generated/aio/operations/_container_operations.py +41 -38
  15. azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +26 -23
  16. azure/storage/blob/_generated/aio/operations/_patch.py +2 -8
  17. azure/storage/blob/_generated/aio/operations/_service_operations.py +19 -17
  18. azure/storage/blob/_generated/models/__init__.py +91 -80
  19. azure/storage/blob/_generated/models/_models_py3.py +4 -5
  20. azure/storage/blob/_generated/models/_patch.py +2 -8
  21. azure/storage/blob/_generated/operations/__init__.py +14 -8
  22. azure/storage/blob/_generated/operations/_append_blob_operations.py +14 -12
  23. azure/storage/blob/_generated/operations/_blob_operations.py +34 -32
  24. azure/storage/blob/_generated/operations/_block_blob_operations.py +16 -14
  25. azure/storage/blob/_generated/operations/_container_operations.py +28 -26
  26. azure/storage/blob/_generated/operations/_page_blob_operations.py +19 -17
  27. azure/storage/blob/_generated/operations/_patch.py +2 -8
  28. azure/storage/blob/_generated/operations/_service_operations.py +18 -16
  29. azure/storage/blob/_models.py +1 -1
  30. azure/storage/blob/_serialize.py +1 -0
  31. azure/storage/blob/_shared/authentication.py +1 -1
  32. azure/storage/blob/_shared/base_client.py +1 -1
  33. azure/storage/blob/_shared/parser.py +2 -10
  34. azure/storage/blob/_shared/policies_async.py +2 -2
  35. azure/storage/blob/_shared/request_handlers.py +3 -4
  36. azure/storage/blob/_shared/response_handlers.py +2 -2
  37. azure/storage/blob/_shared/shared_access_signature.py +2 -2
  38. azure/storage/blob/_version.py +1 -1
  39. azure/storage/blob/aio/_blob_client_async.py +6 -3
  40. azure/storage/blob/aio/_download_async.py +3 -3
  41. {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0b1.dist-info}/METADATA +20 -20
  42. {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0b1.dist-info}/RECORD +45 -45
  43. {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0b1.dist-info}/WHEEL +1 -1
  44. {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0b1.dist-info}/LICENSE +0 -0
  45. {azure_storage_blob-12.24.0b1.dist-info → azure_storage_blob-12.25.0b1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,3 @@
1
- # pylint: disable=too-many-lines,too-many-statements
2
1
  # coding=utf-8
3
2
  # --------------------------------------------------------------------------
4
3
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,8 +6,9 @@
7
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  # --------------------------------------------------------------------------
9
8
  import sys
10
- from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, Type, TypeVar, Union
9
+ from typing import Any, AsyncIterator, Callable, Dict, IO, List, Literal, Optional, TypeVar, Union
11
10
 
11
+ from azure.core import AsyncPipelineClient
12
12
  from azure.core.exceptions import (
13
13
  ClientAuthenticationError,
14
14
  HttpResponseError,
@@ -25,6 +25,7 @@ from azure.core.tracing.decorator_async import distributed_trace_async
25
25
  from azure.core.utils import case_insensitive_dict
26
26
 
27
27
  from ... import models as _models
28
+ from ..._serialization import Deserializer, Serializer
28
29
  from ...operations._service_operations import (
29
30
  build_filter_blobs_request,
30
31
  build_get_account_info_request,
@@ -35,11 +36,12 @@ from ...operations._service_operations import (
35
36
  build_set_properties_request,
36
37
  build_submit_batch_request,
37
38
  )
39
+ from .._configuration import AzureBlobStorageConfiguration
38
40
 
39
41
  if sys.version_info >= (3, 9):
40
42
  from collections.abc import MutableMapping
41
43
  else:
42
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
44
+ from typing import MutableMapping # type: ignore
43
45
  T = TypeVar("T")
44
46
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
45
47
 
@@ -58,13 +60,13 @@ class ServiceOperations:
58
60
 
59
61
  def __init__(self, *args, **kwargs) -> None:
60
62
  input_args = list(args)
61
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
62
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
63
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
64
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
63
+ self._client: AsyncPipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
64
+ self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
65
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
66
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
65
67
 
66
68
  @distributed_trace_async
67
- async def set_properties( # pylint: disable=inconsistent-return-statements
69
+ async def set_properties(
68
70
  self,
69
71
  storage_service_properties: _models.StorageServiceProperties,
70
72
  timeout: Optional[int] = None,
@@ -90,7 +92,7 @@ class ServiceOperations:
90
92
  :rtype: None
91
93
  :raises ~azure.core.exceptions.HttpResponseError:
92
94
  """
93
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
95
+ error_map: MutableMapping = {
94
96
  401: ClientAuthenticationError,
95
97
  404: ResourceNotFoundError,
96
98
  409: ResourceExistsError,
@@ -165,7 +167,7 @@ class ServiceOperations:
165
167
  :rtype: ~azure.storage.blob.models.StorageServiceProperties
166
168
  :raises ~azure.core.exceptions.HttpResponseError:
167
169
  """
168
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
170
+ error_map: MutableMapping = {
169
171
  401: ClientAuthenticationError,
170
172
  404: ResourceNotFoundError,
171
173
  409: ResourceExistsError,
@@ -240,7 +242,7 @@ class ServiceOperations:
240
242
  :rtype: ~azure.storage.blob.models.StorageServiceStats
241
243
  :raises ~azure.core.exceptions.HttpResponseError:
242
244
  """
243
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
245
+ error_map: MutableMapping = {
244
246
  401: ClientAuthenticationError,
245
247
  404: ResourceNotFoundError,
246
248
  409: ResourceExistsError,
@@ -342,7 +344,7 @@ class ServiceOperations:
342
344
  :rtype: ~azure.storage.blob.models.ListContainersSegmentResponse
343
345
  :raises ~azure.core.exceptions.HttpResponseError:
344
346
  """
345
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
347
+ error_map: MutableMapping = {
346
348
  401: ClientAuthenticationError,
347
349
  404: ResourceNotFoundError,
348
350
  409: ResourceExistsError,
@@ -424,7 +426,7 @@ class ServiceOperations:
424
426
  :rtype: ~azure.storage.blob.models.UserDelegationKey
425
427
  :raises ~azure.core.exceptions.HttpResponseError:
426
428
  """
427
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
429
+ error_map: MutableMapping = {
428
430
  401: ClientAuthenticationError,
429
431
  404: ResourceNotFoundError,
430
432
  409: ResourceExistsError,
@@ -484,7 +486,7 @@ class ServiceOperations:
484
486
  return deserialized # type: ignore
485
487
 
486
488
  @distributed_trace_async
487
- async def get_account_info( # pylint: disable=inconsistent-return-statements
489
+ async def get_account_info(
488
490
  self, timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, **kwargs: Any
489
491
  ) -> None:
490
492
  # pylint: disable=line-too-long
@@ -503,7 +505,7 @@ class ServiceOperations:
503
505
  :rtype: None
504
506
  :raises ~azure.core.exceptions.HttpResponseError:
505
507
  """
506
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
508
+ error_map: MutableMapping = {
507
509
  401: ClientAuthenticationError,
508
510
  404: ResourceNotFoundError,
509
511
  409: ResourceExistsError,
@@ -585,7 +587,7 @@ class ServiceOperations:
585
587
  :rtype: AsyncIterator[bytes]
586
588
  :raises ~azure.core.exceptions.HttpResponseError:
587
589
  """
588
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
590
+ error_map: MutableMapping = {
589
591
  401: ClientAuthenticationError,
590
592
  404: ResourceNotFoundError,
591
593
  409: ResourceExistsError,
@@ -696,7 +698,7 @@ class ServiceOperations:
696
698
  :rtype: ~azure.storage.blob.models.FilterBlobSegment
697
699
  :raises ~azure.core.exceptions.HttpResponseError:
698
700
  """
699
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
701
+ error_map: MutableMapping = {
700
702
  401: ClientAuthenticationError,
701
703
  404: ResourceNotFoundError,
702
704
  409: ResourceExistsError,
@@ -5,88 +5,99 @@
5
5
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
8
9
 
9
- from ._models_py3 import AccessPolicy
10
- from ._models_py3 import AppendPositionAccessConditions
11
- from ._models_py3 import ArrowConfiguration
12
- from ._models_py3 import ArrowField
13
- from ._models_py3 import BlobFlatListSegment
14
- from ._models_py3 import BlobHTTPHeaders
15
- from ._models_py3 import BlobHierarchyListSegment
16
- from ._models_py3 import BlobItemInternal
17
- from ._models_py3 import BlobMetadata
18
- from ._models_py3 import BlobName
19
- from ._models_py3 import BlobPrefix
20
- from ._models_py3 import BlobPropertiesInternal
21
- from ._models_py3 import BlobTag
22
- from ._models_py3 import BlobTags
23
- from ._models_py3 import Block
24
- from ._models_py3 import BlockList
25
- from ._models_py3 import BlockLookupList
26
- from ._models_py3 import ClearRange
27
- from ._models_py3 import ContainerCpkScopeInfo
28
- from ._models_py3 import ContainerItem
29
- from ._models_py3 import ContainerProperties
30
- from ._models_py3 import CorsRule
31
- from ._models_py3 import CpkInfo
32
- from ._models_py3 import CpkScopeInfo
33
- from ._models_py3 import DelimitedTextConfiguration
34
- from ._models_py3 import FilterBlobItem
35
- from ._models_py3 import FilterBlobSegment
36
- from ._models_py3 import GeoReplication
37
- from ._models_py3 import JsonTextConfiguration
38
- from ._models_py3 import KeyInfo
39
- from ._models_py3 import LeaseAccessConditions
40
- from ._models_py3 import ListBlobsFlatSegmentResponse
41
- from ._models_py3 import ListBlobsHierarchySegmentResponse
42
- from ._models_py3 import ListContainersSegmentResponse
43
- from ._models_py3 import Logging
44
- from ._models_py3 import Metrics
45
- from ._models_py3 import ModifiedAccessConditions
46
- from ._models_py3 import PageList
47
- from ._models_py3 import PageRange
48
- from ._models_py3 import QueryFormat
49
- from ._models_py3 import QueryRequest
50
- from ._models_py3 import QuerySerialization
51
- from ._models_py3 import RetentionPolicy
52
- from ._models_py3 import SequenceNumberAccessConditions
53
- from ._models_py3 import SignedIdentifier
54
- from ._models_py3 import SourceModifiedAccessConditions
55
- from ._models_py3 import StaticWebsite
56
- from ._models_py3 import StorageError
57
- from ._models_py3 import StorageServiceProperties
58
- from ._models_py3 import StorageServiceStats
59
- from ._models_py3 import UserDelegationKey
10
+ from typing import TYPE_CHECKING
60
11
 
61
- from ._azure_blob_storage_enums import AccessTier
62
- from ._azure_blob_storage_enums import AccessTierOptional
63
- from ._azure_blob_storage_enums import AccessTierRequired
64
- from ._azure_blob_storage_enums import AccountKind
65
- from ._azure_blob_storage_enums import ArchiveStatus
66
- from ._azure_blob_storage_enums import BlobCopySourceTags
67
- from ._azure_blob_storage_enums import BlobExpiryOptions
68
- from ._azure_blob_storage_enums import BlobImmutabilityPolicyMode
69
- from ._azure_blob_storage_enums import BlobType
70
- from ._azure_blob_storage_enums import BlockListType
71
- from ._azure_blob_storage_enums import CopyStatusType
72
- from ._azure_blob_storage_enums import DeleteSnapshotsOptionType
73
- from ._azure_blob_storage_enums import EncryptionAlgorithmType
74
- from ._azure_blob_storage_enums import FilterBlobsIncludeItem
75
- from ._azure_blob_storage_enums import GeoReplicationStatusType
76
- from ._azure_blob_storage_enums import LeaseDurationType
77
- from ._azure_blob_storage_enums import LeaseStateType
78
- from ._azure_blob_storage_enums import LeaseStatusType
79
- from ._azure_blob_storage_enums import ListBlobsIncludeItem
80
- from ._azure_blob_storage_enums import ListContainersIncludeType
81
- from ._azure_blob_storage_enums import PremiumPageBlobAccessTier
82
- from ._azure_blob_storage_enums import PublicAccessType
83
- from ._azure_blob_storage_enums import QueryFormatType
84
- from ._azure_blob_storage_enums import RehydratePriority
85
- from ._azure_blob_storage_enums import SequenceNumberActionType
86
- from ._azure_blob_storage_enums import SkuName
87
- from ._azure_blob_storage_enums import StorageErrorCode
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+
16
+ from ._models_py3 import ( # type: ignore
17
+ AccessPolicy,
18
+ AppendPositionAccessConditions,
19
+ ArrowConfiguration,
20
+ ArrowField,
21
+ BlobFlatListSegment,
22
+ BlobHTTPHeaders,
23
+ BlobHierarchyListSegment,
24
+ BlobItemInternal,
25
+ BlobMetadata,
26
+ BlobName,
27
+ BlobPrefix,
28
+ BlobPropertiesInternal,
29
+ BlobTag,
30
+ BlobTags,
31
+ Block,
32
+ BlockList,
33
+ BlockLookupList,
34
+ ClearRange,
35
+ ContainerCpkScopeInfo,
36
+ ContainerItem,
37
+ ContainerProperties,
38
+ CorsRule,
39
+ CpkInfo,
40
+ CpkScopeInfo,
41
+ DelimitedTextConfiguration,
42
+ FilterBlobItem,
43
+ FilterBlobSegment,
44
+ GeoReplication,
45
+ JsonTextConfiguration,
46
+ KeyInfo,
47
+ LeaseAccessConditions,
48
+ ListBlobsFlatSegmentResponse,
49
+ ListBlobsHierarchySegmentResponse,
50
+ ListContainersSegmentResponse,
51
+ Logging,
52
+ Metrics,
53
+ ModifiedAccessConditions,
54
+ PageList,
55
+ PageRange,
56
+ QueryFormat,
57
+ QueryRequest,
58
+ QuerySerialization,
59
+ RetentionPolicy,
60
+ SequenceNumberAccessConditions,
61
+ SignedIdentifier,
62
+ SourceModifiedAccessConditions,
63
+ StaticWebsite,
64
+ StorageError,
65
+ StorageServiceProperties,
66
+ StorageServiceStats,
67
+ UserDelegationKey,
68
+ )
69
+
70
+ from ._azure_blob_storage_enums import ( # type: ignore
71
+ AccessTier,
72
+ AccessTierOptional,
73
+ AccessTierRequired,
74
+ AccountKind,
75
+ ArchiveStatus,
76
+ BlobCopySourceTags,
77
+ BlobExpiryOptions,
78
+ BlobImmutabilityPolicyMode,
79
+ BlobType,
80
+ BlockListType,
81
+ CopyStatusType,
82
+ DeleteSnapshotsOptionType,
83
+ EncryptionAlgorithmType,
84
+ FilterBlobsIncludeItem,
85
+ GeoReplicationStatusType,
86
+ LeaseDurationType,
87
+ LeaseStateType,
88
+ LeaseStatusType,
89
+ ListBlobsIncludeItem,
90
+ ListContainersIncludeType,
91
+ PremiumPageBlobAccessTier,
92
+ PublicAccessType,
93
+ QueryFormatType,
94
+ RehydratePriority,
95
+ SequenceNumberActionType,
96
+ SkuName,
97
+ StorageErrorCode,
98
+ )
88
99
  from ._patch import __all__ as _patch_all
89
- from ._patch import * # pylint: disable=unused-wildcard-import
100
+ from ._patch import *
90
101
  from ._patch import patch_sdk as _patch_sdk
91
102
 
92
103
  __all__ = [
@@ -169,5 +180,5 @@ __all__ = [
169
180
  "SkuName",
170
181
  "StorageErrorCode",
171
182
  ]
172
- __all__.extend([p for p in _patch_all if p not in __all__])
183
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
173
184
  _patch_sdk()
@@ -1,5 +1,5 @@
1
- # coding=utf-8
2
1
  # pylint: disable=too-many-lines
2
+ # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
5
5
  # Licensed under the MIT License. See License.txt in the project root for license information.
@@ -16,10 +16,9 @@ from .. import _serialization
16
16
  if sys.version_info >= (3, 9):
17
17
  from collections.abc import MutableMapping
18
18
  else:
19
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
19
+ from typing import MutableMapping # type: ignore
20
20
 
21
21
  if TYPE_CHECKING:
22
- # pylint: disable=unused-import,ungrouped-imports
23
22
  from .. import models as _models
24
23
  JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
25
24
 
@@ -502,7 +501,7 @@ class BlobPrefix(_serialization.Model):
502
501
  self.name = name
503
502
 
504
503
 
505
- class BlobPropertiesInternal(_serialization.Model): # pylint: disable=too-many-instance-attributes
504
+ class BlobPropertiesInternal(_serialization.Model):
506
505
  """Properties of a blob.
507
506
 
508
507
  All required parameters must be populated in order to send to server.
@@ -1122,7 +1121,7 @@ class ContainerItem(_serialization.Model):
1122
1121
  self.metadata = metadata
1123
1122
 
1124
1123
 
1125
- class ContainerProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
1124
+ class ContainerProperties(_serialization.Model):
1126
1125
  """Properties of a container.
1127
1126
 
1128
1127
  All required parameters must be populated in order to send to server.
@@ -2,19 +2,13 @@
2
2
  # Copyright (c) Microsoft Corporation.
3
3
  # Licensed under the MIT License.
4
4
  # ------------------------------------
5
-
6
-
7
5
  """Customize generated code here.
8
6
 
9
7
  Follow our quickstart for examples: https://aka.ms/azsdk/python/dpcodegen/python/customize
10
8
  """
11
- from typing import TYPE_CHECKING
12
-
13
- if TYPE_CHECKING:
14
- # pylint: disable=unused-import,ungrouped-imports
9
+ from typing import List
15
10
 
16
- from typing import List
17
- __all__ = [] # type: List[str] # Add all objects you want publicly available to users at this package level
11
+ __all__: List[str] = [] # Add all objects you want publicly available to users at this package level
18
12
 
19
13
 
20
14
  def patch_sdk():
@@ -5,16 +5,22 @@
5
5
  # Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  # Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  # --------------------------------------------------------------------------
8
+ # pylint: disable=wrong-import-position
8
9
 
9
- from ._service_operations import ServiceOperations
10
- from ._container_operations import ContainerOperations
11
- from ._blob_operations import BlobOperations
12
- from ._page_blob_operations import PageBlobOperations
13
- from ._append_blob_operations import AppendBlobOperations
14
- from ._block_blob_operations import BlockBlobOperations
10
+ from typing import TYPE_CHECKING
11
+
12
+ if TYPE_CHECKING:
13
+ from ._patch import * # pylint: disable=unused-wildcard-import
14
+
15
+ from ._service_operations import ServiceOperations # type: ignore
16
+ from ._container_operations import ContainerOperations # type: ignore
17
+ from ._blob_operations import BlobOperations # type: ignore
18
+ from ._page_blob_operations import PageBlobOperations # type: ignore
19
+ from ._append_blob_operations import AppendBlobOperations # type: ignore
20
+ from ._block_blob_operations import BlockBlobOperations # type: ignore
15
21
 
16
22
  from ._patch import __all__ as _patch_all
17
- from ._patch import * # pylint: disable=unused-wildcard-import
23
+ from ._patch import *
18
24
  from ._patch import patch_sdk as _patch_sdk
19
25
 
20
26
  __all__ = [
@@ -25,5 +31,5 @@ __all__ = [
25
31
  "AppendBlobOperations",
26
32
  "BlockBlobOperations",
27
33
  ]
28
- __all__.extend([p for p in _patch_all if p not in __all__])
34
+ __all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
29
35
  _patch_sdk()
@@ -1,4 +1,4 @@
1
- # pylint: disable=too-many-lines,too-many-statements
1
+ # pylint: disable=too-many-lines
2
2
  # coding=utf-8
3
3
  # --------------------------------------------------------------------------
4
4
  # Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,8 +8,9 @@
8
8
  # --------------------------------------------------------------------------
9
9
  import datetime
10
10
  import sys
11
- from typing import Any, Callable, Dict, IO, Literal, Optional, Type, TypeVar, Union
11
+ from typing import Any, Callable, Dict, IO, Literal, Optional, TypeVar, Union
12
12
 
13
+ from azure.core import PipelineClient
13
14
  from azure.core.exceptions import (
14
15
  ClientAuthenticationError,
15
16
  HttpResponseError,
@@ -24,12 +25,13 @@ from azure.core.tracing.decorator import distributed_trace
24
25
  from azure.core.utils import case_insensitive_dict
25
26
 
26
27
  from .. import models as _models
27
- from .._serialization import Serializer
28
+ from .._configuration import AzureBlobStorageConfiguration
29
+ from .._serialization import Deserializer, Serializer
28
30
 
29
31
  if sys.version_info >= (3, 9):
30
32
  from collections.abc import MutableMapping
31
33
  else:
32
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
34
+ from typing import MutableMapping # type: ignore
33
35
  T = TypeVar("T")
34
36
  ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
35
37
 
@@ -431,10 +433,10 @@ class AppendBlobOperations:
431
433
 
432
434
  def __init__(self, *args, **kwargs):
433
435
  input_args = list(args)
434
- self._client = input_args.pop(0) if input_args else kwargs.pop("client")
435
- self._config = input_args.pop(0) if input_args else kwargs.pop("config")
436
- self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
437
- self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
436
+ self._client: PipelineClient = input_args.pop(0) if input_args else kwargs.pop("client")
437
+ self._config: AzureBlobStorageConfiguration = input_args.pop(0) if input_args else kwargs.pop("config")
438
+ self._serialize: Serializer = input_args.pop(0) if input_args else kwargs.pop("serializer")
439
+ self._deserialize: Deserializer = input_args.pop(0) if input_args else kwargs.pop("deserializer")
438
440
 
439
441
  @distributed_trace
440
442
  def create( # pylint: disable=inconsistent-return-statements
@@ -501,7 +503,7 @@ class AppendBlobOperations:
501
503
  :rtype: None
502
504
  :raises ~azure.core.exceptions.HttpResponseError:
503
505
  """
504
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
506
+ error_map: MutableMapping = {
505
507
  401: ClientAuthenticationError,
506
508
  404: ResourceNotFoundError,
507
509
  409: ResourceExistsError,
@@ -686,7 +688,7 @@ class AppendBlobOperations:
686
688
  :rtype: None
687
689
  :raises ~azure.core.exceptions.HttpResponseError:
688
690
  """
689
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
691
+ error_map: MutableMapping = {
690
692
  401: ClientAuthenticationError,
691
693
  404: ResourceNotFoundError,
692
694
  409: ResourceExistsError,
@@ -880,7 +882,7 @@ class AppendBlobOperations:
880
882
  :rtype: None
881
883
  :raises ~azure.core.exceptions.HttpResponseError:
882
884
  """
883
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
885
+ error_map: MutableMapping = {
884
886
  401: ClientAuthenticationError,
885
887
  404: ResourceNotFoundError,
886
888
  409: ResourceExistsError,
@@ -1042,7 +1044,7 @@ class AppendBlobOperations:
1042
1044
  :rtype: None
1043
1045
  :raises ~azure.core.exceptions.HttpResponseError:
1044
1046
  """
1045
- error_map: MutableMapping[int, Type[HttpResponseError]] = { # pylint: disable=unsubscriptable-object
1047
+ error_map: MutableMapping = {
1046
1048
  401: ClientAuthenticationError,
1047
1049
  404: ResourceNotFoundError,
1048
1050
  409: ResourceExistsError,