From 27d42a9e9f3aa71fa1130534b638737b529fd5af Mon Sep 17 00:00:00 2001 From: tnghwk0661 Date: Mon, 29 Aug 2022 19:24:38 +0900 Subject: [PATCH 1/4] fix: typo in storage/azure-storage-file-share --- .vscode/cspell.json | 48 +++++++++++++++++-- .../azure-storage-file-share/CHANGELOG.md | 2 +- .../azure/storage/fileshare/_download.py | 2 +- .../storage/fileshare/_shared/policies.py | 2 +- .../fileshare/_shared/request_handlers.py | 2 +- .../storage/fileshare/_shared/uploads.py | 2 +- .../storage/fileshare/aio/_download_async.py | 2 +- 7 files changed, 51 insertions(+), 9 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index cc5464888fa2..653e7015451a 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -91,7 +91,6 @@ "sdk/synapse/azure-synapse-managedprivateendpoints/**", "sdk/storage/azure-storage-file-datalake/**", "sdk/synapse/azure-synapse-spark/**", - "sdk/storage/azure-storage-file-share/**", "sdk/synapse/azure-synapse/**", "sdk/videoanalyzer/azure-media-videoanalyzer-edge/**", "sdk/synapse/azure-synapse-artifacts/**", @@ -227,6 +226,7 @@ "LPCWSTR", "Lucene", "mbps", + "mibps", "mgmt", "mhsm", "mipsle", @@ -352,7 +352,10 @@ "ispkg", "openpyxl", "deps", - "prnumber" + "prnumber", + "yarl", + "SDDL", + "dacl" ], "overrides": [ { @@ -379,7 +382,7 @@ "dont", "UMLS", "nach", - "año", + "año", "BRCPF", "abril", "zalgo", @@ -618,6 +621,45 @@ "words": [ "pysdkci" ] + }, + { + "filename": "sdk/storage/azure-storage-file-share/**", + "words": [ + "XSMB", + "rcwd", + "rcwdl", + "prevsharesnapshot", + "rscc", + "rscd", + "rsce", + "rscl", + "rsct", + "skoid", + "sktid", + "saoid", + "suoid", + "scid", + "mydirectory", + "myfile", + "mydir", + "amet", + "consectetur", + "elit", + "adipiscing", + "pyacrstoragestorname", + "pyrmtstoragestorname", + "vhds", + "mday", + "abcdefghijklmnop", + "filetoupdate", + "mydomain", + "vhds", + "utdir", + "myaccount", + "testid", + "filea", + "fileb" + ] } ], "allowCompoundWords": true diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index a37ac9e2df8b..cd043e49e30e 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -232,7 +232,7 @@ the following APIs: - `path` (str): The full path of the file. - `share` (str): The share the file will be downloaded from. - `properties` (`FileProperties`): The properties of the file. - - `size` (int): The size of the download. Either the total file size, or the length of a subsection if sepcified. Previously called `download_size`. + - `size` (int): The size of the download. Either the total file size, or the length of a subsection if specified. Previously called `download_size`. - `StorageStreamDownloader` now has new functions: - `readall()`: Reads the complete download stream, returning bytes. This replaces the functions `content_as_bytes` and `content_as_text` which have been deprecated. - `readinto(stream)`: Download the complete stream into the supplied writable stream, returning the number of bytes written. This replaces the function `download_to_stream` which has been deprecated. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py index d2aaf8ce0c52..c64d1b9e46cb 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_download.py @@ -201,7 +201,7 @@ class StorageStreamDownloader(object): # pylint: disable=too-many-instance-attr The properties of the file being downloaded. If only a range of the data is being downloaded, this will be reflected in the properties. :ivar int size: - The size of the total data in the stream. This will be the byte range if speficied, + The size of the total data in the stream. This will be the byte range if specified, otherwise the total size of the file. """ diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py index 1e068d5188a8..e3c0252534a0 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py @@ -82,7 +82,7 @@ def is_retry(response, mode): # pylint: disable=too-many-return-statements """ status = response.http_response.status_code if 300 <= status < 500: - # An exception occured, but in most cases it was expected. Examples could + # An exception occurred, but in most cases it was expected. Examples could # include a 309 Conflict or 412 Precondition Failed. if status == 404 and mode == LocationMode.SECONDARY: # Response code 404 should be retried if secondary was used. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py index 325825c53a09..7048358affc4 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/request_handlers.py @@ -134,7 +134,7 @@ def validate_and_format_range_headers( range_validation = None if check_content_md5: if start_range is None or end_range is None: - raise ValueError("Both start and end range requied for MD5 content validation.") + raise ValueError("Both start and end range required for MD5 content validation.") if end_range - start_range > 4 * 1024 * 1024: raise ValueError("Getting content MD5 for a range greater than 4MB is not supported.") range_validation = 'true' diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py index 279f084ff970..4421dcd55090 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/uploads.py @@ -586,7 +586,7 @@ def tell(self, *args, **kwargs): raise UnsupportedOperation("Data generator does not support tell.") def seek(self, *args, **kwargs): - raise UnsupportedOperation("Data generator is unseekable.") + raise UnsupportedOperation("Data generator is not seekable.") def read(self, size): data = self.leftover diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py index 5a386135a3e9..b79655f6f32e 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/aio/_download_async.py @@ -156,7 +156,7 @@ class StorageStreamDownloader(object): # pylint: disable=too-many-instance-attr The properties of the file being downloaded. If only a range of the data is being downloaded, this will be reflected in the properties. :ivar int size: - The size of the total data in the stream. This will be the byte range if speficied, + The size of the total data in the stream. This will be the byte range if specified, otherwise the total size of the file. """ From e40dd50c75e35c35f163f47746b577d01f8b62c8 Mon Sep 17 00:00:00 2001 From: tnghwk0661 Date: Fri, 2 Sep 2022 00:32:40 +0900 Subject: [PATCH 2/4] Apply the same change to _shared folder and edit some files Co-authored-by: wonhyeongseo --- .vscode/cspell.json | 28 +++++++++++-------- .../azure/storage/blob/_shared/avro/schema.py | 6 ++-- .../azure/storage/blob/_shared/policies.py | 2 +- .../storage/blob/_shared/request_handlers.py | 2 +- .../blob/_shared/shared_access_signature.py | 3 +- .../azure/storage/blob/_shared/uploads.py | 2 +- .../storage/filedatalake/_shared/policies.py | 2 +- .../filedatalake/_shared/request_handlers.py | 2 +- .../_shared/shared_access_signature.py | 3 +- .../storage/filedatalake/_shared/uploads.py | 2 +- .../_shared/shared_access_signature.py | 3 +- .../azure/storage/queue/_shared/policies.py | 2 +- .../storage/queue/_shared/request_handlers.py | 2 +- .../queue/_shared/shared_access_signature.py | 3 +- .../azure/storage/queue/_shared/uploads.py | 2 +- 15 files changed, 37 insertions(+), 27 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 653e7015451a..94617a512f1d 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -382,6 +382,7 @@ "dont", "UMLS", "nach", + "año", "año", "BRCPF", "abril", @@ -629,16 +630,6 @@ "rcwd", "rcwdl", "prevsharesnapshot", - "rscc", - "rscd", - "rsce", - "rscl", - "rsct", - "skoid", - "sktid", - "saoid", - "suoid", - "scid", "mydirectory", "myfile", "mydir", @@ -649,7 +640,6 @@ "pyacrstoragestorname", "pyrmtstoragestorname", "vhds", - "mday", "abcdefghijklmnop", "filetoupdate", "mydomain", @@ -660,6 +650,22 @@ "filea", "fileb" ] + }, + { + "filename": "sdk/storage/**/_shared/*.py", + "words": [ + "mday", + "ISREG", + "ISLNK" + ] + }, + { + "filename": "sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/*.py", + "words": [ + "struct", + "ints", + "nbytes" + ] } ], "allowCompoundWords": true diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/schema.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/schema.py index ffe28530167f..34fa5980a5f5 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/schema.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/schema.py @@ -259,7 +259,7 @@ def __init__(self, name, namespace=None): # Validate the fullname: if _RE_FULL_NAME.match(self._fullname) is None: raise SchemaParseException( - 'Invalid schema name %r infered from name %r and namespace %r.' + 'Invalid schema name %r inferred from name %r and namespace %r.' % (self._fullname, self._name, self._namespace)) def __eq__(self, other): @@ -439,9 +439,9 @@ def name_ref(self, names): """Reports this schema name relative to the specified name tracker. Args: - names: Avro name tracker to relativise this schema name against. + names: Avro name tracker to relativize this schema name against. Returns: - This schema name, relativised against the specified name tracker. + This schema name, relativized against the specified name tracker. """ if self.namespace == names.default_namespace: return self.name diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py index 4a526d13c804..607eaf07e363 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py @@ -86,7 +86,7 @@ def is_retry(response, mode): # pylint: disable=too-many-return-statements """ status = response.http_response.status_code if 300 <= status < 500: - # An exception occured, but in most cases it was expected. Examples could + # An exception occurred, but in most cases it was expected. Examples could # include a 309 Conflict or 412 Precondition Failed. if status == 404 and mode == LocationMode.SECONDARY: # Response code 404 should be retried if secondary was used. diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/request_handlers.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/request_handlers.py index ba760434cac9..acc8b2403d3f 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/request_handlers.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/request_handlers.py @@ -139,7 +139,7 @@ def validate_and_format_range_headers( range_validation = None if check_content_md5: if start_range is None or end_range is None: - raise ValueError("Both start and end range requied for MD5 content validation.") + raise ValueError("Both start and end range required for MD5 content validation.") if end_range - start_range > 4 * 1024 * 1024: raise ValueError("Getting content MD5 for a range greater than 4MB is not supported.") range_validation = 'true' diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py index d2ebfc4b8095..4ae68fdace72 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py @@ -10,7 +10,8 @@ from .constants import X_MS_VERSION from . import sign_string, url_quote - +# cspell:ignoreRegExp rsc. +# cspell:ignoreRegExp s..?id class QueryStringConstants(object): SIGNED_SIGNATURE = 'sig' SIGNED_PERMISSION = 'sp' diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/uploads.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/uploads.py index ba2b49218dcd..cfa183728d96 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/uploads.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/uploads.py @@ -586,7 +586,7 @@ def tell(self, *args, **kwargs): raise UnsupportedOperation("Data generator does not support tell.") def seek(self, *args, **kwargs): - raise UnsupportedOperation("Data generator is unseekable.") + raise UnsupportedOperation("Data generator is not seekable.") def read(self, size): data = self.leftover diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py index 1e068d5188a8..e3c0252534a0 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py @@ -82,7 +82,7 @@ def is_retry(response, mode): # pylint: disable=too-many-return-statements """ status = response.http_response.status_code if 300 <= status < 500: - # An exception occured, but in most cases it was expected. Examples could + # An exception occurred, but in most cases it was expected. Examples could # include a 309 Conflict or 412 Precondition Failed. if status == 404 and mode == LocationMode.SECONDARY: # Response code 404 should be retried if secondary was used. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py index 325825c53a09..7048358affc4 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/request_handlers.py @@ -134,7 +134,7 @@ def validate_and_format_range_headers( range_validation = None if check_content_md5: if start_range is None or end_range is None: - raise ValueError("Both start and end range requied for MD5 content validation.") + raise ValueError("Both start and end range required for MD5 content validation.") if end_range - start_range > 4 * 1024 * 1024: raise ValueError("Getting content MD5 for a range greater than 4MB is not supported.") range_validation = 'true' diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py index 03e04af1cb1c..3e1c10415fd6 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/shared_access_signature.py @@ -10,7 +10,8 @@ from .constants import X_MS_VERSION from . import sign_string, url_quote - +# cspell:ignoreRegExp rsc. +# cspell:ignoreRegExp s..?id class QueryStringConstants(object): SIGNED_SIGNATURE = 'sig' SIGNED_PERMISSION = 'sp' diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py index 279f084ff970..4421dcd55090 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/uploads.py @@ -586,7 +586,7 @@ def tell(self, *args, **kwargs): raise UnsupportedOperation("Data generator does not support tell.") def seek(self, *args, **kwargs): - raise UnsupportedOperation("Data generator is unseekable.") + raise UnsupportedOperation("Data generator is not seekable.") def read(self, size): data = self.leftover diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py index bfab7176572e..fc25d8037ccc 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/shared_access_signature.py @@ -10,7 +10,8 @@ from .constants import X_MS_VERSION from . import sign_string, url_quote - +# cspell:ignoreRegExp rsc. +# cspell:ignoreRegExp s..?id class QueryStringConstants(object): SIGNED_SIGNATURE = 'sig' SIGNED_PERMISSION = 'sp' diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py index ea802fe2da73..41768f50843c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py @@ -82,7 +82,7 @@ def is_retry(response, mode): # pylint: disable=too-many-return-statements """ status = response.http_response.status_code if 300 <= status < 500: - # An exception occured, but in most cases it was expected. Examples could + # An exception occurred, but in most cases it was expected. Examples could # include a 309 Conflict or 412 Precondition Failed. if status == 404 and mode == LocationMode.SECONDARY: # Response code 404 should be retried if secondary was used. diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py index 325825c53a09..7048358affc4 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/request_handlers.py @@ -134,7 +134,7 @@ def validate_and_format_range_headers( range_validation = None if check_content_md5: if start_range is None or end_range is None: - raise ValueError("Both start and end range requied for MD5 content validation.") + raise ValueError("Both start and end range required for MD5 content validation.") if end_range - start_range > 4 * 1024 * 1024: raise ValueError("Getting content MD5 for a range greater than 4MB is not supported.") range_validation = 'true' diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/shared_access_signature.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/shared_access_signature.py index 8577f30ea59c..f1c56dacebf7 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/shared_access_signature.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/shared_access_signature.py @@ -10,7 +10,8 @@ from .constants import X_MS_VERSION from . import sign_string, url_quote - +# cspell:ignoreRegExp rsc. +# cspell:ignoreRegExp s..?id class QueryStringConstants(object): SIGNED_SIGNATURE = 'sig' SIGNED_PERMISSION = 'sp' diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py index 279f084ff970..4421dcd55090 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/uploads.py @@ -586,7 +586,7 @@ def tell(self, *args, **kwargs): raise UnsupportedOperation("Data generator does not support tell.") def seek(self, *args, **kwargs): - raise UnsupportedOperation("Data generator is unseekable.") + raise UnsupportedOperation("Data generator is not seekable.") def read(self, size): data = self.leftover From afe71f4cb36611d178bf6a6333e1792a2a972f87 Mon Sep 17 00:00:00 2001 From: tnghwk0661 Date: Fri, 2 Sep 2022 19:19:33 +0900 Subject: [PATCH 3/4] modify cspell.json --- .vscode/cspell.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index 94617a512f1d..e8e7809bf4d5 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -383,7 +383,6 @@ "UMLS", "nach", "año", - "año", "BRCPF", "abril", "zalgo", @@ -652,16 +651,11 @@ ] }, { - "filename": "sdk/storage/**/_shared/*.py", + "filename": "sdk/storage/**/_shared/**", "words": [ "mday", "ISREG", - "ISLNK" - ] - }, - { - "filename": "sdk/storage/azure-storage-blob/azure/storage/blob/_shared/avro/*.py", - "words": [ + "ISLNK", "struct", "ints", "nbytes" From e0f32439c9e0f0c7fc21f87183e982ffa4c7e939 Mon Sep 17 00:00:00 2001 From: Jacob Lauzon <96087589+jalauzon-msft@users.noreply.github.com> Date: Wed, 7 Sep 2022 10:46:57 -0700 Subject: [PATCH 4/4] Fix merge --- .vscode/cspell.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/cspell.json b/.vscode/cspell.json index b3e7105600ed..ed6cfa6356ea 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -84,7 +84,6 @@ "sdk/storage/azure-storage-queue/**", "sdk/synapse/azure-synapse-managedprivateendpoints/**", "sdk/storage/azure-storage-file-datalake/**", - "sdk/synapse/azure-synapse-spark/**", "sdk/synapse/azure-synapse/**", "sdk/videoanalyzer/azure-media-videoanalyzer-edge/**", "sdk/synapse/azure-synapse-artifacts/**",