From d546a397318b01e39f7bbdea6cd1a27844c76df2 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Mon, 30 Oct 2023 11:23:00 -0700 Subject: [PATCH] ruff: Fix B018 Found useless expression. Signed-off-by: Anders Kaseorg --- zulip/integrations/log2zulip/log2zulip | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/zulip/integrations/log2zulip/log2zulip b/zulip/integrations/log2zulip/log2zulip index 7babd4d18..e28583e5a 100755 --- a/zulip/integrations/log2zulip/log2zulip +++ b/zulip/integrations/log2zulip/log2zulip @@ -20,12 +20,8 @@ try: setup_path() except ImportError: - try: - import scripts.lib.setup_path_on_import - - scripts.lib.setup_path_on_import # Suppress unused import warning - except ImportError: - pass + with contextlib.suppress(ImportError): + import scripts.lib.setup_path_on_import # noqa: F401 sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../"))