Skip to content

Commit

Permalink
Fix remaining flake8 src issues (except for filer)
Browse files Browse the repository at this point in the history
  • Loading branch information
leodube-aot committed Jan 31, 2024
1 parent 60dcc92 commit 3c7a776
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion queue_services/entity-bn/src/entity_bn/resources/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
get_recipient_from_auth,
substitute_template_parts,
)

from entity_emailer.services.logging import structured_log


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
get_recipient_from_auth,
substitute_template_parts,
)

from entity_emailer.services.logging import structured_log


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)}")
Expand Down

0 comments on commit 3c7a776

Please sign in to comment.