Skip to content

Commit d1cace1

Browse files
lint issue fix
1 parent 0fa6124 commit d1cace1

8 files changed

Lines changed: 9 additions & 11 deletions

File tree

src/ContentProcessor/src/tests/pipeline/entities/test_pipeline_data.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from unittest.mock import Mock
33
from libs.pipeline.entities.pipeline_step_result import StepResult
44
from libs.pipeline.entities.pipeline_status import PipelineStatus
5-
from libs.azure_helper.storage_blob import StorageBlobHelper
65

76

87
def test_update_step():

src/ContentProcessor/src/tests/process_host/test_handler_type_loader.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import pytest
2-
from importlib import import_module
32
from libs.pipeline.queue_handler_base import HandlerBase
43
from libs.process_host.handler_type_loader import load
54

src/ContentProcessor/src/tests/utils/test_base64_util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
import base64
32
from libs.utils.base64_util import is_base64_encoded
43

src/ContentProcessorAPI/app/libs/storage_blob/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ def delete_blob_and_cleanup(self, blob_name, container_name=None):
9393

9494
def delete_folder(self, folder_name, container_name=None):
9595
container_client = self._get_container_client(container_name)
96-
96+
9797
# List all blobs inside the folder
9898
blobs_to_delete = container_client.list_blobs(name_starts_with=folder_name + "/")
9999

100100
# Delete each blob
101101
for blob in blobs_to_delete:
102102
blob_client = container_client.get_blob_client(blob.name)
103103
blob_client.delete_blob()
104-
104+
105105
blobs_to_delete = container_client.list_blobs()
106106
if not blobs_to_delete:
107107

@@ -110,4 +110,4 @@ def delete_folder(self, folder_name, container_name=None):
110110

111111
# Delete the (virtual) folder in the Container
112112
blob_client = container_client.get_blob_client(folder_name)
113-
blob_client.delete_blob()
113+
blob_client.delete_blob()

src/ContentProcessorAPI/app/routers/contentprocessor.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ async def get_original_file(
492492
file_stream, media_type=content_type_string, headers=headers
493493
)
494494

495+
495496
@router.delete(
496497
"/processed/{process_id}",
497498
response_model=ContentResultDelete,
@@ -502,9 +503,9 @@ async def get_original_file(
502503
)
503504
async def delete_processed_file(
504505
process_id: str, app_config: AppConfiguration = Depends(get_app_config)
505-
) -> ContentResultDelete:
506+
) -> ContentResultDelete:
506507
try:
507-
deleted_file = CosmosContentProcess(process_id=process_id).delete_processed_file(
508+
deleted_file = CosmosContentProcess(process_id=process_id).delete_processed_file(
508509
connection_string=app_config.app_cosmos_connstr,
509510
database_name=app_config.app_cosmos_database,
510511
collection_name=app_config.app_cosmos_container_process,
@@ -518,4 +519,4 @@ async def delete_processed_file(
518519
status="Success" if deleted_file else "Failed",
519520
process_id=deleted_file.process_id if deleted_file else "",
520521
message="" if deleted_file else "This record no longer exists. Please refresh the page."
521-
)
522+
)

src/ContentProcessorAPI/app/routers/models/contentprocessor/content_process.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def get_status_from_cosmos(
189189
return ContentProcess(**existing_process[0])
190190
else:
191191
return None
192-
192+
193193
def delete_processed_file(
194194
self,
195195
connection_string: str,

src/ContentProcessorAPI/app/routers/models/contentprocessor/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ class ContentResultUpdate(BaseModel):
6464
process_id: str
6565
modified_result: dict
6666

67+
6768
class ContentResultDelete(BaseModel):
6869
process_id: str
6970
status: str

src/ContentProcessorAPI/app/tests/routers/test_schemavault.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from fastapi.testclient import TestClient
44
from unittest.mock import MagicMock
55
from app.routers.schemavault import router, get_schemas
6-
from app.routers.models.schmavault.model import SchemaVaultUnregisterRequest
76

87

98
app = FastAPI()

0 commit comments

Comments
 (0)