[Storage] Fixed all errors in next-pylint for azure-storage-file-share#46609
Open
weirongw23-msft wants to merge 8 commits into
Open
[Storage] Fixed all errors in next-pylint for azure-storage-file-share#46609weirongw23-msft wants to merge 8 commits into
next-pylint for azure-storage-file-share#46609weirongw23-msft wants to merge 8 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets azure-storage-file-share’s test/perfstress/sample code to satisfy next-pylint by cleaning up imports, formatting, and a few lint-triggering patterns (e.g., long lines, unused args), plus a handful of small test reliability tweaks (e.g., requests timeouts).
Changes:
- Reordered/trimmed imports and reformatted long literals/calls across the test suite to address pylint findings.
- Added/updated several
pylint: disable=...directives for known false-positives in test code. - Added explicit
timeoutto some directrequests.*calls in tests.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/storage/azure-storage-file-share/tests/test_share_async.py | Import/order tweaks; pylint disables; minor formatting. |
| sdk/storage/azure-storage-file-share/tests/test_share.py | Import/order tweaks; pylint disables; minor formatting. |
| sdk/storage/azure-storage-file-share/tests/test_nfs_async.py | Import cleanup/reorder and formatting. |
| sdk/storage/azure-storage-file-share/tests/test_nfs.py | Import cleanup/reorder and formatting. |
| sdk/storage/azure-storage-file-share/tests/test_helpers_async.py | Import reorder; pylint disable on transport import. |
| sdk/storage/azure-storage-file-share/tests/test_helpers.py | Import reorder; pylint disable on transport import. |
| sdk/storage/azure-storage-file-share/tests/test_handle_async.py | Import reorder/spacing changes. |
| sdk/storage/azure-storage-file-share/tests/test_handle.py | Import reorder/spacing changes; minor comprehension simplification. |
| sdk/storage/azure-storage-file-share/tests/test_get_file_async.py | Import reorder; unicode literal cleanup; long literal formatting. |
| sdk/storage/azure-storage-file-share/tests/test_get_file.py | Import reorder; unicode literal cleanup; long literal formatting. |
| sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py | Import reorder; loop simplification; pylint disable. |
| sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py | Import reorder; loop simplification; formatting. |
| sdk/storage/azure-storage-file-share/tests/test_file_client_async.py | Import reorder; formatting; pylint disables; test assertions adjusted. |
| sdk/storage/azure-storage-file-share/tests/test_file_client.py | Import reorder; formatting; pylint disables; test assertions adjusted. |
| sdk/storage/azure-storage-file-share/tests/test_file_async.py | Import reorder; formatting; add requests timeouts; removed a test; misc cleanup. |
| sdk/storage/azure-storage-file-share/tests/test_file_api_version_async.py | Import reorder/spacing. |
| sdk/storage/azure-storage-file-share/tests/test_file_api_version.py | Import reorder/spacing. |
| sdk/storage/azure-storage-file-share/tests/test_file.py | Import reorder; formatting; add requests timeouts; removed a test; misc cleanup. |
| sdk/storage/azure-storage-file-share/tests/test_directory_async.py | Import reorder; formatting; unicode/str assertions adjusted. |
| sdk/storage/azure-storage-file-share/tests/test_directory.py | Import reorder; formatting; unicode/str assertions adjusted. |
| sdk/storage/azure-storage-file-share/tests/settings/testcase.py | Removed legacy/unused compatibility imports; added pylint disable for wildcard imports; formatting. |
| sdk/storage/azure-storage-file-share/tests/perfstress_tests/upload.py | Import cleanup/reorder. |
| sdk/storage/azure-storage-file-share/tests/perfstress_tests/_test_base.py | Formatting for long calls/argparse definitions. |
| sdk/storage/azure-storage-file-share/tests/perfstress_tests/T1_legacy_tests/upload.py | Import cleanup (drop unused import). |
| sdk/storage/azure-storage-file-share/tests/perfstress_tests/T1_legacy_tests/_test_base.py | Formatting; pylint disables for legacy patterns/import. |
| sdk/storage/azure-storage-file-share/tests/encryption_test_helper.py | Factor error message into a constant and use it in raises. |
| sdk/storage/azure-storage-file-share/samples/file_samples_service.py | Remove trailing whitespace/newline cleanup. |
| sdk/storage/azure-storage-file-share/samples/file_samples_client.py | Remove trailing whitespace/newline cleanup. |
| sdk/storage/azure-storage-file-share/samples/file_samples_authentication.py | Remove trailing whitespace/newline cleanup. |
Comments suppressed due to low confidence (1)
sdk/storage/azure-storage-file-share/tests/test_share.py:88
_delete_sharesaccepts aprefix(and call sites pass a specific share name), but the method ignores it and deletes every share fromlist_shares. This makes the helper’s behavior non-obvious and can interfere with other tests using the same account. Consider filtering by the provided prefix/name (or remove the parameter and update call sites).
def _delete_shares(self, prefix=TEST_SHARE_PREFIX): # pylint: disable=unused-argument
for l in self.fsc.list_shares(include_snapshots=True):
try:
self.fsc.delete_share(l.name, delete_snapshots=True)
except:
pass
Member
jalauzon-msft
left a comment
There was a problem hiding this comment.
Two comments plus Copilot comments seem mostly good to look at too.
jalauzon-msft
approved these changes
May 11, 2026
jalauzon-msft
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
:)