diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c1897051..47b497ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.291 + rev: v0.1.5 hooks: - id: ruff args: ["--fix"] 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 diff --git a/pyproject.toml b/pyproject.toml index 088179b4..04fe4ff6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -67,7 +67,7 @@ lint = [ "black[jupyter]==23.9.1", "mdformat>0.7", "mdformat-gfm>=0.3.5", - "ruff==0.0.291" + "ruff==0.1.5" ] [tool.ruff.pylint]