From 97f7a29fec48c8a4c7b9df765938b1a4ff7195c7 Mon Sep 17 00:00:00 2001 From: crazywoola <427733928@qq.com> Date: Wed, 19 Mar 2025 19:06:46 +0800 Subject: [PATCH] fix: lint --- .../workflow/nodes/http_request/executor.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/api/core/workflow/nodes/http_request/executor.py b/api/core/workflow/nodes/http_request/executor.py index c65e9614a6..a37aa0fcc4 100644 --- a/api/core/workflow/nodes/http_request/executor.py +++ b/api/core/workflow/nodes/http_request/executor.py @@ -292,8 +292,20 @@ class Executor: do http request depending on api bundle """ if self.method not in { - "get", "head", "post", "put", "delete", "patch", "options", - "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", + "get", + "head", + "post", + "put", + "delete", + "patch", + "options", + "GET", + "POST", + "PUT", + "PATCH", + "DELETE", + "HEAD", + "OPTIONS", }: raise InvalidHttpMethodError(f"Invalid http method {self.method}") @@ -309,7 +321,7 @@ class Executor: "follow_redirects": True, "max_retries": self.max_retries, } - + # Use with statement to ensure proper resource cleanup with httpx.Client() as client: try: