From b4e096adfdf20d9e620e967935a40f598a3341b6 Mon Sep 17 00:00:00 2001 From: Janson Bunce Date: Tue, 4 Feb 2025 12:07:11 -0800 Subject: [PATCH] Resolve linting issues --- backend/src/xfd_django/xfd_api/api_methods/sync.py | 8 +------- backend/src/xfd_django/xfd_api/schema_models/scan.py | 8 -------- backend/src/xfd_django/xfd_api/schema_models/sync.py | 6 ++++++ infrastructure/database.tf | 2 +- infrastructure/stage.tfvars | 2 +- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/backend/src/xfd_django/xfd_api/api_methods/sync.py b/backend/src/xfd_django/xfd_api/api_methods/sync.py index 25c9fb183..e7c305ea4 100644 --- a/backend/src/xfd_django/xfd_api/api_methods/sync.py +++ b/backend/src/xfd_django/xfd_api/api_methods/sync.py @@ -1,10 +1,4 @@ -"""Split a list into chunks based on a byte size limit. - -Each chunk will have a total byte size that does not exceed the specified -maximum. Chunks are stored as dictionaries containing the chunked items -and their bounds. -""" - +"""Split a list into chunks based on a byte size limit.""" # Standard Python Libraries # Standard Python Libraries diff --git a/backend/src/xfd_django/xfd_api/schema_models/scan.py b/backend/src/xfd_django/xfd_api/schema_models/scan.py index df18b40a5..a65cdacb6 100644 --- a/backend/src/xfd_django/xfd_api/schema_models/scan.py +++ b/backend/src/xfd_django/xfd_api/schema_models/scan.py @@ -285,14 +285,6 @@ class GenericMessageResponseModel(BaseModel): memory="8192", description="Pull in vulnerability data from PEs Vulnerability database", ), - "vulnScanningSync": ScanSchema( - type="fargate", - isPassive=True, - global_scan=True, - cpu="1024", - memory="8192", - description="Pull in vulnerability data from PEs Vulnerability database", - ), "wappalyzer": ScanSchema( type="fargate", isPassive=True, diff --git a/backend/src/xfd_django/xfd_api/schema_models/sync.py b/backend/src/xfd_django/xfd_api/schema_models/sync.py index 4100978c7..e50cb0394 100644 --- a/backend/src/xfd_django/xfd_api/schema_models/sync.py +++ b/backend/src/xfd_django/xfd_api/schema_models/sync.py @@ -1,3 +1,5 @@ +"""Module containing schema models for syncing data.""" + # Standard Python Libraries from typing import Any @@ -6,8 +8,12 @@ class SyncResponse(BaseModel): + """Response model for sync operations.""" + status: int class SyncBody(BaseModel): + """Request body model for sync operations.""" + data: Any diff --git a/infrastructure/database.tf b/infrastructure/database.tf index a93b52170..a187855fb 100644 --- a/infrastructure/database.tf +++ b/infrastructure/database.tf @@ -488,4 +488,4 @@ resource "aws_s3_bucket_server_side_encryption_configuration" "crossfeed-lz-sync sse_algorithm = "AES256" } } -} \ No newline at end of file +} diff --git a/infrastructure/stage.tfvars b/infrastructure/stage.tfvars index 6a83d8e3e..43cf9bd80 100644 --- a/infrastructure/stage.tfvars +++ b/infrastructure/stage.tfvars @@ -120,4 +120,4 @@ ssm_pe_api_key = "/crossfeed/staging/PE_API_KEY" ssm_cf_api_key = "/crossfeed/staging/CF_API_KEY" create_elasticache_cluster = true ssm_dmz_api_key = "/crossfeed/staging/DMZ_API_KEY" -ssm_mdl_sync_endpoint = "/crossfeed/staging/MDL_SYNC_ENDPOINT" \ No newline at end of file +ssm_mdl_sync_endpoint = "/crossfeed/staging/MDL_SYNC_ENDPOINT"