Skip to content

Commit fda90e7

Browse files
Address feedback from STG84 GA API View (Azure#26057)
1 parent 7bbe0b3 commit fda90e7

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

sdk/storage/azure-storage-blob/azure/storage/blob/_download.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import time
1010
import warnings
1111
from io import BytesIO
12-
from typing import Generic, Iterator, Optional, TypeVar
12+
from typing import Generic, IO, Iterator, Optional, TypeVar
1313

1414
from azure.core.exceptions import DecodeError, HttpResponseError, IncompleteReadError
1515
from azure.core.tracing.common import with_current_context
@@ -646,8 +646,7 @@ def read(self, size: Optional[int] = -1) -> T:
646646
return data.decode(self._encoding)
647647
return data
648648

649-
def readall(self):
650-
# type: () -> T
649+
def readall(self) -> T:
651650
"""
652651
Read the entire contents of this blob.
653652
This operation is blocking until all data is downloaded.
@@ -697,7 +696,7 @@ def content_as_text(self, max_concurrency=1, encoding="UTF-8"):
697696
self._encoding = encoding
698697
return self.readall()
699698

700-
def readinto(self, stream):
699+
def readinto(self, stream: IO[T]) -> int:
701700
"""Download the contents of this file to a stream.
702701
703702
:param stream:

sdk/storage/azure-storage-blob/azure/storage/blob/aio/_download_async.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import warnings
1010
from io import BytesIO
1111
from itertools import islice
12-
from typing import AsyncIterator, Generic, Optional, TypeVar
12+
from typing import AsyncIterator, Generic, IO, Optional, TypeVar
1313

1414
import asyncio
1515

@@ -552,8 +552,7 @@ async def read(self, size: Optional[int] = -1) -> T:
552552
return data.decode(self._encoding)
553553
return data
554554

555-
async def readall(self):
556-
# type: () -> T
555+
async def readall(self) -> T:
557556
"""
558557
Read the entire contents of this blob.
559558
This operation is blocking until all data is downloaded.
@@ -603,7 +602,7 @@ async def content_as_text(self, max_concurrency=1, encoding="UTF-8"):
603602
self._encoding = encoding
604603
return await self.readall()
605604

606-
async def readinto(self, stream):
605+
async def readinto(self, stream: IO[T]) -> int:
607606
"""Download the contents of this blob to a stream.
608607
609608
:param stream:

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_download.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------
6-
from typing import Iterator, Optional
6+
from typing import IO, Iterator, Optional
77

88
from ._deserialize import from_blob_properties
99

@@ -59,7 +59,7 @@ def readall(self) -> bytes:
5959
"""
6060
return self._downloader.readall()
6161

62-
def readinto(self, stream) -> int:
62+
def readinto(self, stream: IO[bytes]) -> int:
6363
"""Download the contents of this file to a stream.
6464
6565
:param stream:

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_download_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------
6-
from typing import AsyncIterator, Optional
6+
from typing import AsyncIterator, IO, Optional
77

88
from .._deserialize import from_blob_properties
99

@@ -59,7 +59,7 @@ async def readall(self) -> bytes:
5959
"""
6060
return await self._downloader.readall()
6161

62-
async def readinto(self, stream) -> int:
62+
async def readinto(self, stream: IO[bytes]) -> int:
6363
"""Download the contents of this file to a stream.
6464
6565
:param stream:

sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ async def create_file_system(self, metadata=None, # type: Optional[Dict[str, st
197197
:param public_access:
198198
To specify whether data in the file system may be accessed publicly and the level of access.
199199
:type public_access: ~azure.storage.filedatalake.PublicAccess
200-
:keyword file_system_encryption_scope:
200+
:keyword encryption_scope_options:
201201
Specifies the default encryption scope to set on the file system and use for
202202
all future writes.
203203

sdk/storage/azure-storage-file-share/azure/storage/fileshare/_share_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def _format_url(self, hostname):
196196
def from_connection_string(
197197
cls, conn_str, # type: str
198198
share_name, # type: str
199-
snapshot=None, # type: Optional[str]
199+
snapshot=None, # type: Optional[Union[str, Dict[str, Any]]]
200200
credential=None, # type: Optional[Union[str, Dict[str, str], AzureNamedKeyCredential, AzureSasCredential, "TokenCredential"]] # pylint: disable=line-too-long
201201
**kwargs # type: Any
202202
):

0 commit comments

Comments
 (0)