From addf332f1c2f9ab3011080e2e85e3ed6eb2c957f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 17 Nov 2023 01:11:05 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- enterprise_gateway/client/gateway_client.py | 4 +--- enterprise_gateway/services/processproxies/conductor.py | 8 ++------ enterprise_gateway/services/processproxies/yarn.py | 4 +--- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/enterprise_gateway/client/gateway_client.py b/enterprise_gateway/client/gateway_client.py index beaf53d3..3f8ca000 100644 --- a/enterprise_gateway/client/gateway_client.py +++ b/enterprise_gateway/client/gateway_client.py @@ -218,9 +218,7 @@ def execute(self, code, timeout=REQUEST_TIMEOUT): ): # We timed out. If post idle, its ok, else make mention of it if not post_idle: self.log.warning( - "Unexpected timeout occurred for msg_id: {} - no 'idle' status received!".format( - msg_id - ) + f"Unexpected timeout occurred for msg_id: {msg_id} - no 'idle' status received!" ) break diff --git a/enterprise_gateway/services/processproxies/conductor.py b/enterprise_gateway/services/processproxies/conductor.py index 17b8c3e7..5a6e2e34 100644 --- a/enterprise_gateway/services/processproxies/conductor.py +++ b/enterprise_gateway/services/processproxies/conductor.py @@ -189,9 +189,7 @@ def _update_notebook_master_rest_url(self, env_dict: dict) -> None: response = None except Exception as e: self.log.warning( - "Getting instance group with cmd '{}' failed with exception: '{}'. Continuing...".format( - cmd, e - ) + f"Getting instance group with cmd '{cmd}' failed with exception: '{e}'. Continuing..." ) return @@ -623,9 +621,7 @@ def _kill_app_by_driver_id(self, driver_id: str): response = json.loads(output) if output else None except Exception as e: self.log.warning( - "Termination of application with cmd '{}' failed with exception: '{}'. Continuing...".format( - cmd, e - ) + f"Termination of application with cmd '{cmd}' failed with exception: '{e}'. Continuing..." ) self.log.debug(f"Kill response: {response}") return response diff --git a/enterprise_gateway/services/processproxies/yarn.py b/enterprise_gateway/services/processproxies/yarn.py index c50b7cd5..384e0391 100644 --- a/enterprise_gateway/services/processproxies/yarn.py +++ b/enterprise_gateway/services/processproxies/yarn.py @@ -581,9 +581,7 @@ def _kill_app_by_id(self, app_id: str) -> Response: response = self.resource_mgr.cluster_application_kill(application_id=app_id) except Exception as e: self.log.warning( - "Termination of application '{}' failed with exception: '{}'. Continuing...".format( - app_id, e - ) + f"Termination of application '{app_id}' failed with exception: '{e}'. Continuing..." ) return response