Skip to content

Commit 1e6077d

Browse files
[Storage] next-pylint azure-storage-queue (#46361)
1 parent dccabe3 commit 1e6077d

25 files changed

Lines changed: 208 additions & 214 deletions

sdk/storage/azure-storage-queue/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/storage/azure-storage-queue",
5-
"Tag": "python/storage/azure-storage-queue_0148be6d93"
5+
"Tag": "python/storage/azure-storage-queue_5064253f11"
66
}

sdk/storage/azure-storage-queue/samples/queue_samples_authentication.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
4) STORAGE_ACCOUNT_KEY - the storage account access key
2626
"""
2727

28+
# pylint: disable=unused-variable, name-too-long
29+
2830
from datetime import datetime, timedelta
2931
import os
3032
import sys

sdk/storage/azure-storage-queue/samples/queue_samples_authentication_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
4) STORAGE_ACCOUNT_KEY - the storage account access key
2626
"""
2727

28+
# pylint: disable=unused-variable, name-too-long
29+
2830
from datetime import datetime, timedelta
2931
import asyncio
3032
import os

sdk/storage/azure-storage-queue/samples/queue_samples_hello_world.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2121
"""
2222

23+
# pylint: disable=unused-variable
24+
2325
import os
2426
import sys
2527

sdk/storage/azure-storage-queue/samples/queue_samples_hello_world_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2121
"""
2222

23+
# pylint: disable=unused-variable, name-too-long
24+
2325
import asyncio
2426
import os
2527
import sys

sdk/storage/azure-storage-queue/samples/queue_samples_message.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2323
"""
2424

25+
# pylint: disable=unused-variable
26+
2527
from datetime import datetime, timedelta
2628
import os
2729
import sys

sdk/storage/azure-storage-queue/samples/queue_samples_message_async.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2323
"""
2424

25+
# pylint: disable=unused-variable
26+
2527
from datetime import datetime, timedelta
2628
import asyncio
2729
import os

sdk/storage/azure-storage-queue/samples/queue_samples_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2121
"""
2222

23+
# pylint: disable=unused-variable
24+
2325
import os
2426
import sys
2527

@@ -140,7 +142,7 @@ def get_queue_client(self):
140142
sys.exit(1)
141143

142144
# Instantiate the QueueServiceClient from a connection string
143-
from azure.storage.queue import QueueServiceClient, QueueClient
145+
from azure.storage.queue import QueueServiceClient
144146

145147
queue_service = QueueServiceClient.from_connection_string(conn_str=self.connection_string)
146148

sdk/storage/azure-storage-queue/samples/queue_samples_service_async.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
1) STORAGE_CONNECTION_STRING - the connection string to your storage account
2121
"""
2222

23+
# pylint: disable=unused-variable
24+
2325
import asyncio
2426
import os
2527
import sys
@@ -143,7 +145,7 @@ async def get_queue_client_async(self):
143145
sys.exit(1)
144146

145147
# Instantiate the QueueServiceClient from a connection string
146-
from azure.storage.queue.aio import QueueServiceClient, QueueClient
148+
from azure.storage.queue.aio import QueueServiceClient
147149

148150
queue_service = QueueServiceClient.from_connection_string(conn_str=self.connection_string)
149151

sdk/storage/azure-storage-queue/tests/encryption_test_helper.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Licensed under the MIT License. See License.txt in the project root for
44
# license information.
55
# --------------------------------------------------------------------------
6+
7+
import os
8+
69
from cryptography.hazmat.backends import default_backend
710
from cryptography.hazmat.primitives.asymmetric.padding import (
811
OAEP,
@@ -16,6 +19,9 @@
1619
)
1720

1821

22+
_ERROR_UNKNOWN_KEY_WRAP_ALGORITHM = "Unknown key wrap algorithm."
23+
24+
1925
class KeyWrapper:
2026
def __init__(self, kid="local:key1"):
2127
# Must have constant key value for recorded tests, otherwise we could use a random generator.
@@ -92,9 +98,8 @@ def mock_urandom(size: int) -> bytes:
9298
"""
9399
if size == 12:
94100
return b"Mb\xd5N\xc2\xbd\xa0\xc8\xa4L\xfb\xa0"
95-
elif size == 16:
101+
if size == 16:
96102
return b"\xbb\xd6\x87\xb6j\xe5\xdc\x93\xb0\x13\x1e\xcc\x9f\xf4\xca\xab"
97-
elif size == 32:
103+
if size == 32:
98104
return b"\x08\xe0A\xb6\xf2\xb7x\x8f\xe5\xdap\x87^6x~\xa4F\xc4\xe9\xb1\x8a:\xfbC%S\x0cZ\xbb\xbe\x88"
99-
else:
100-
return os.urandom(size)
105+
return os.urandom(size)

0 commit comments

Comments
 (0)