Skip to content

Commit 8dd5f5f

Browse files
Danny ShinDanny Shin
authored andcommitted
linter fix
1 parent b8b4192 commit 8dd5f5f

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

examples/chem-sync-local-flask/local_app/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from threading import Thread
22

3-
from benchling_sdk.apps.helpers.webhook_helpers import verify
43
from flask import Flask, request
54

65
from local_app.benchling_app.handler import handle_webhook
7-
from local_app.benchling_app.setup import app_definition_id
6+
7+
# from local_app.benchling_app.setup import app_definition_id # noqa: ERA001
88
from local_app.lib.logger import get_logger
99

1010
logger = get_logger()
@@ -21,12 +21,12 @@ def health_check() -> tuple[str, int]:
2121
@app.route("/1/webhooks/<path:target>", methods=["POST"])
2222
def receive_webhooks(target: str) -> tuple[str, int]: # noqa: ARG001
2323
# For security, don't do anything else without first verifying the webhook
24-
app_def_id = app_definition_id()
24+
# app_def_id = app_definition_id() # noqa: ERA001
2525

2626
# Important! To verify webhooks, we need to pass the body as an unmodified string
2727
# Flask's request.data is bytes, so decode to string. Passing bytes or JSON won't work
2828
# Disable when using local instance of Benchling Monolith
29-
# verify(app_def_id, request.data.decode("utf-8"), request.headers)
29+
# verify(app_def_id, request.data.decode("utf-8"), request.headers) # noqa: ERA001
3030

3131
logger.debug("Received webhook message: %s", request.json)
3232
# Dispatch work and ACK webhook as quickly as possible

examples/chem-sync-local-flask/local_app/benchling_app/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from benchling_sdk.models.webhooks.v0 import WebhookEnvelopeV0
99
from httpx import Client
1010

11+
1112
def init_app_from_webhook(webhook: WebhookEnvelopeV0) -> App:
1213
return App(webhook.app.id, _benchling_from_webhook(webhook))
1314

0 commit comments

Comments
 (0)