Skip to content

Commit 087e3e8

Browse files
authored
[1.4.0] Bump fileshare 2025-05-05 (#65)
* update azure-storage-data-fileshare to 2025-05-05 * update version info
1 parent 38589b5 commit 087e3e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+6300
-3400
lines changed

README.rst

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Handles multi-API versions of Azure Storage Data Plane originally from https://g
1717

1818
Change Log
1919
----------
20+
1.4.0
21+
++++++
22+
* fileshare: Support v2025-05-05(12.21.0) and remove v2024-08-04
23+
2024
1.3.0
2125
++++++
2226
* fileshare: Support v2024-08-04(12.17.0) and remove v2022-11-02

azure/multiapi/storagev2/fileshare/v2024_08_04/_generated/_patch.py

-33
This file was deleted.

azure/multiapi/storagev2/fileshare/v2024_08_04/_generated/aio/_patch.py

-33
This file was deleted.

azure/multiapi/storagev2/fileshare/v2024_08_04/_generated/models/__init__.py

-111
This file was deleted.

azure/multiapi/storagev2/fileshare/v2024_08_04/_deserialize.py renamed to azure/multiapi/storagev2/fileshare/v2025_05_05/_deserialize.py

+30-20
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,21 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------_
6-
from typing import ( # pylint: disable=unused-import
7-
Tuple, Dict, List,
6+
from typing import (
7+
Any, cast, Dict, List, Optional, Tuple,
88
TYPE_CHECKING
99
)
1010

11-
from ._models import ShareProperties, DirectoryProperties, FileProperties
12-
from ._shared.response_handlers import deserialize_metadata
1311
from ._generated.models import ShareFileRangeList
12+
from ._models import DirectoryProperties, FileProperties, ShareProperties
13+
from ._shared.response_handlers import deserialize_metadata
1414

15+
if TYPE_CHECKING:
16+
from azure.core.pipeline import PipelineResponse
17+
from ._shared.models import LocationMode
1518

16-
def deserialize_share_properties(response, obj, headers):
19+
20+
def deserialize_share_properties(response: "PipelineResponse", obj: Any, headers: Dict[str, Any]) -> ShareProperties:
1721
metadata = deserialize_metadata(response, obj, headers)
1822
share_properties = ShareProperties(
1923
metadata=metadata,
@@ -22,7 +26,11 @@ def deserialize_share_properties(response, obj, headers):
2226
return share_properties
2327

2428

25-
def deserialize_directory_properties(response, obj, headers):
29+
def deserialize_directory_properties(
30+
response: "PipelineResponse",
31+
obj: Any,
32+
headers: Dict[str, Any]
33+
) -> DirectoryProperties:
2634
metadata = deserialize_metadata(response, obj, headers)
2735
directory_properties = DirectoryProperties(
2836
metadata=metadata,
@@ -31,7 +39,7 @@ def deserialize_directory_properties(response, obj, headers):
3139
return directory_properties
3240

3341

34-
def deserialize_file_properties(response, obj, headers):
42+
def deserialize_file_properties(response: "PipelineResponse", obj: Any, headers: Dict[str, Any]) -> FileProperties:
3543
metadata = deserialize_metadata(response, obj, headers)
3644
file_properties = FileProperties(
3745
metadata=metadata,
@@ -45,31 +53,33 @@ def deserialize_file_properties(response, obj, headers):
4553
return file_properties
4654

4755

48-
def deserialize_file_stream(response, obj, headers):
56+
def deserialize_file_stream(
57+
response: "PipelineResponse",
58+
obj: Any,
59+
headers: Dict[str, Any]
60+
) -> Tuple["LocationMode", Any]:
4961
file_properties = deserialize_file_properties(response, obj, headers)
5062
obj.properties = file_properties
5163
return response.http_response.location_mode, obj
5264

5365

5466
# Extracts out file permission
55-
def deserialize_permission(response, obj, headers): # pylint: disable=unused-argument
56-
return obj.permission
67+
def deserialize_permission(response: "PipelineResponse", obj: Any, headers: Dict[str, Any]) -> Optional[str]: # pylint: disable=unused-argument
68+
return cast(Optional[str], obj.permission)
69+
5770

5871
# Extracts out file permission key
59-
def deserialize_permission_key(response, obj, headers): # pylint: disable=unused-argument
72+
def deserialize_permission_key(response: "PipelineResponse", obj: Any, headers: Dict[str, Any]) -> Optional[str]: # pylint: disable=unused-argument
6073
if response is None or headers is None:
6174
return None
62-
return headers.get('x-ms-file-permission-key', None)
75+
return cast(Optional[str], headers.get('x-ms-file-permission-key', None))
6376

6477

65-
def get_file_ranges_result(ranges):
66-
# type: (ShareFileRangeList) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]
67-
file_ranges = [] # type: ignore
68-
clear_ranges = [] # type: List
78+
def get_file_ranges_result(ranges: ShareFileRangeList) -> Tuple[List[Dict[str, int]], List[Dict[str, int]]]:
79+
file_ranges = []
80+
clear_ranges = []
6981
if ranges.ranges:
70-
file_ranges = [
71-
{'start': file_range.start, 'end': file_range.end} for file_range in ranges.ranges] # type: ignore
82+
file_ranges = [{'start': file_range.start, 'end': file_range.end} for file_range in ranges.ranges]
7283
if ranges.clear_ranges:
73-
clear_ranges = [
74-
{'start': clear_range.start, 'end': clear_range.end} for clear_range in ranges.clear_ranges]
84+
clear_ranges = [{'start': clear_range.start, 'end': clear_range.end} for clear_range in ranges.clear_ranges]
7585
return file_ranges, clear_ranges

0 commit comments

Comments
 (0)