Skip to content

Commit 5f53912

Browse files
committed
[system] Linting
1 parent b764274 commit 5f53912

25 files changed

+70
-64
lines changed

sebs/azure/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@
2020
2121
Example:
2222
Basic usage for Azure benchmarking:
23-
2423
```python
2524
from sebs.azure import Azure, AzureConfig
26-
25+
2726
# Load configuration
2827
config = AzureConfig.deserialize(config_dict, cache, handlers)
29-
28+
3029
# Initialize Azure system
3130
azure = Azure(sebs_config, config, cache, docker_client, handlers)
3231
azure.initialize()
33-
32+
3433
# Deploy and benchmark functions
3534
function = azure.create_function(code_package, func_name, False, "")
3635
result = function.invoke(payload)

sebs/azure/azure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
1818
Example:
1919
Basic usage for Azure benchmarking:
20-
20+
2121
```python
2222
from sebs.azure.azure import Azure
2323
from sebs.azure.config import AzureConfig
24-
24+
2525
# Initialize Azure system with configuration
2626
azure_system = Azure(sebs_config, azure_config, cache, docker_client, handlers)
2727
azure_system.initialize()
28-
28+
2929
# Deploy and benchmark functions
3030
function = azure_system.create_function(code_package, func_name, False, "")
3131
result = function.invoke(payload)
@@ -729,7 +729,7 @@ def download_metrics(
729729

730730
resource_group = self.config.resources.resource_group(self.cli_instance)
731731
# Avoid warnings in the next step
732-
ret = self.cli_instance.execute(
732+
self.cli_instance.execute(
733733
"az feature register --name AIWorkspacePreview " "--namespace microsoft.insights"
734734
)
735735
app_id_query = self.cli_instance.execute(

sebs/azure/blob_storage.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,15 @@
1010
1111
Example:
1212
Basic usage for Azure Blob Storage:
13-
13+
1414
```python
1515
from sebs.azure.blob_storage import BlobStorage
16-
16+
1717
# Initialize with connection string
1818
storage = BlobStorage(region, cache, resources, connection_string, False)
19-
19+
2020
# Upload benchmark data
2121
storage.upload(container_name, filepath, key)
22-
2322
# Download results
2423
storage.download(container_name, key, local_filepath)
2524
```

sebs/azure/cli.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,18 @@
1010
1111
Example:
1212
Basic usage for Azure CLI operations:
13-
13+
1414
```python
1515
from sebs.azure.cli import AzureCLI
16-
16+
1717
# Initialize CLI container
1818
cli = AzureCLI(system_config, docker_client)
19-
19+
2020
# Login to Azure
2121
cli.login(app_id, tenant, password)
22-
2322
# Execute Azure CLI commands
2423
result = cli.execute("az group list")
25-
24+
2625
# Upload function package
2726
cli.upload_package(local_dir, container_dest)
2827
```
@@ -32,7 +31,6 @@
3231
import logging
3332
import os
3433
import tarfile
35-
from typing import Optional
3634

3735
import docker
3836

sebs/azure/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
1313
Example:
1414
Basic usage for setting up Azure configuration:
15-
15+
1616
```python
1717
from sebs.azure.config import AzureConfig, AzureCredentials, AzureResources
1818
from sebs.cache import Cache
19-
19+
2020
# Load configuration from config dict and cache
2121
config = AzureConfig.deserialize(config_dict, cache, handlers)
2222
credentials = config.credentials

sebs/azure/cosmosdb.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010
1111
Example:
1212
Basic usage for CosmosDB operations:
13-
13+
1414
```python
1515
from sebs.azure.cosmosdb import CosmosDB
16-
16+
1717
# Initialize CosmosDB with account
1818
cosmosdb = CosmosDB(cache, resources, cosmosdb_account)
19-
19+
2020
# Set up benchmark database and containers
2121
db_name = cosmosdb.benchmark_database("my-benchmark")
2222
tables = cosmosdb.get_tables("my-benchmark")
23-
23+
2424
# Perform operations
2525
credentials = cosmosdb.credentials()
2626
```

sebs/azure/function.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
1010
Example:
1111
Basic usage for creating an Azure Function:
12-
12+
1313
```python
1414
from sebs.azure.function import AzureFunction
1515
from sebs.azure.config import AzureResources
1616
from sebs.faas.function import FunctionConfig
17-
17+
1818
# Create function with Azure-specific storage
1919
function = AzureFunction(
2020
name="my-function",
21-
benchmark="test-benchmark",
21+
benchmark="test-benchmark",
2222
code_hash="abc123",
2323
function_storage=storage_account,
2424
cfg=function_config

sebs/azure/triggers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
1010
Example:
1111
Basic usage for HTTP trigger:
12-
12+
1313
```python
1414
from sebs.azure.triggers import HTTPTrigger
15-
15+
1616
# Create HTTP trigger with function URL
1717
trigger = HTTPTrigger(function_url, data_storage_account)
18-
18+
1919
# Synchronous invocation
2020
result = trigger.sync_invoke(payload)
21-
21+
2222
# Asynchronous invocation
2323
future = trigger.async_invoke(payload)
2424
result = future.result()

sebs/experiments/eviction_model.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from typing import List, Optional, Tuple, TYPE_CHECKING, Dict, Any
1818
import multiprocessing
1919
from multiprocessing.pool import AsyncResult, ThreadPool
20-
from typing import cast
2120

2221
from sebs.faas.system import System as FaaSSystem
2322
from sebs.faas.function import Function, Trigger
@@ -407,7 +406,7 @@ def run(self) -> None:
407406
Rethrow exceptions if appear
408407
"""
409408
for result in servers_results:
410-
servers_ret = result.get()
409+
result.get()
411410

412411
for result in local_results:
413412
local_ret = result.get()

sebs/faas/nosql.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def envs(self) -> dict:
137137

138138
"""
139139
Table naming convention and implementation requirements.
140-
140+
141141
Each table name follows this pattern:
142142
sebs-benchmarks-{resource_id}-{benchmark-name}-{table-name}
143143
@@ -176,7 +176,7 @@ def create_benchmark_tables(
176176

177177
"""
178178
Platform-specific table implementations:
179-
179+
180180
- AWS: DynamoDB Table
181181
- Azure: CosmosDB Container
182182
- Google Cloud: Firestore in Datastore Mode, Database
@@ -223,7 +223,7 @@ def write_to_table(
223223

224224
"""
225225
Table management operations:
226-
226+
227227
- AWS DynamoDB: Removing & recreating table is the cheapest & fastest option
228228
- Azure CosmosDB: Recreate container
229229
- Google Cloud: Also likely recreate

0 commit comments

Comments
 (0)