From 3c7a776b5796ed8c19a960a13809e5be681ba33f Mon Sep 17 00:00:00 2001 From: leodube-aot Date: Wed, 31 Jan 2024 11:18:59 -0800 Subject: [PATCH] Fix remaining flake8 src issues (except for filer) --- .../src/entity_bn/bn_processors/change_of_registration.py | 5 +++-- queue_services/entity-bn/src/entity_bn/resources/worker.py | 2 +- .../email_processors/agm_extension_notification.py | 1 - .../email_processors/agm_location_change_notification.py | 1 - .../email_processors/special_resolution_helper.py | 4 ++-- queue_services/entity-pay/src/entity_pay/resources/worker.py | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/queue_services/entity-bn/src/entity_bn/bn_processors/change_of_registration.py b/queue_services/entity-bn/src/entity_bn/bn_processors/change_of_registration.py index 250ce95a9a..49bec8a0c3 100644 --- a/queue_services/entity-bn/src/entity_bn/bn_processors/change_of_registration.py +++ b/queue_services/entity-bn/src/entity_bn/bn_processors/change_of_registration.py @@ -239,8 +239,9 @@ def change_address( ) -# TODO: Fix below functions (and add unit test, and enable pylint) to check history data once we have clarity on the versioning changes -# pylint: disable-all +# TODO: Fix below functions (and add unit test) to check history data once we have clarity on the versioning changes +# pylint: disable-all; delete this line once functions fixed +# flake8: noqa; delete this line once functions fixed def has_previous_address(transaction_id: int, office_id: int, address_type: str) -> bool: """Has previous address for the given transaction and office id.""" address_version = version_class(Address) diff --git a/queue_services/entity-bn/src/entity_bn/resources/worker.py b/queue_services/entity-bn/src/entity_bn/resources/worker.py index e8bede5d81..1b3a05d5d5 100644 --- a/queue_services/entity-bn/src/entity_bn/resources/worker.py +++ b/queue_services/entity-bn/src/entity_bn/resources/worker.py @@ -114,7 +114,7 @@ def worker(): with suppress(Exception): event_topic = current_app.config.get("ENTITY_EVENT_TOPIC", "filer") # pylint: disable-next=unused-variable - ret = queue.publish(topic=event_topic, payload=queue.to_queue_message(cloud_event)) + ret = queue.publish(topic=event_topic, payload=queue.to_queue_message(cloud_event)) # noqa: F841 structured_log(request, "INFO", f"publish to entity event: {message.identifier}") structured_log(request, "INFO", f"completed ce: {str(ce)}") diff --git a/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_extension_notification.py b/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_extension_notification.py index a57a1323fa..d6dbcfcb1b 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_extension_notification.py +++ b/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_extension_notification.py @@ -29,7 +29,6 @@ get_recipient_from_auth, substitute_template_parts, ) - from entity_emailer.services.logging import structured_log diff --git a/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_location_change_notification.py b/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_location_change_notification.py index e8290af014..17a9fc9ed8 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_location_change_notification.py +++ b/queue_services/entity-emailer/src/entity_emailer/email_processors/agm_location_change_notification.py @@ -29,7 +29,6 @@ get_recipient_from_auth, substitute_template_parts, ) - from entity_emailer.services.logging import structured_log diff --git a/queue_services/entity-emailer/src/entity_emailer/email_processors/special_resolution_helper.py b/queue_services/entity-emailer/src/entity_emailer/email_processors/special_resolution_helper.py index 859ecc9cce..c22efaf9e4 100644 --- a/queue_services/entity-emailer/src/entity_emailer/email_processors/special_resolution_helper.py +++ b/queue_services/entity-emailer/src/entity_emailer/email_processors/special_resolution_helper.py @@ -54,7 +54,7 @@ def get_completed_pdfs( structured_log( request, "ERROR", - f"Failed to get specialResolution pdf for filing: {filing.id}, status code: {special_resolution.status_code}", + f"Failed to get specialResolution pdf for filing: {filing.id}, status code: {special_resolution.status_code}", # noqa: E501 ) # Change of Name @@ -80,7 +80,7 @@ def get_completed_pdfs( structured_log( request, "ERROR", - f"Failed to get certificateOfNameChange pdf for filing: {filing.id}, status code: {name_change.status_code}", + f"Failed to get certificateOfNameChange pdf for filing: {filing.id}, status code: {name_change.status_code}", # noqa: E501 ) # Certified Rules diff --git a/queue_services/entity-pay/src/entity_pay/resources/worker.py b/queue_services/entity-pay/src/entity_pay/resources/worker.py index cb0af050c7..35277e5ea4 100644 --- a/queue_services/entity-pay/src/entity_pay/resources/worker.py +++ b/queue_services/entity-pay/src/entity_pay/resources/worker.py @@ -129,7 +129,7 @@ def worker(): with suppress(Exception): if filing.effective_date <= filing.payment_completion_date: filer_topic = current_app.config.get("ENTITY_FILER_TOPIC", "filer") - ret = queue.publish(topic=filer_topic, payload=queue.to_queue_message(cloud_event)) + ret = queue.publish(topic=filer_topic, payload=queue.to_queue_message(cloud_event)) # noqa: F841 structured_log(request, "INFO", f"publish to filer for pay-id: {payment_token.id}") structured_log(request, "INFO", f"completed ce: {str(ce)}")