Skip to content

Commit d546a39

Browse files
committed
ruff: Fix B018 Found useless expression.
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 03d132e commit d546a39

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

zulip/integrations/log2zulip/log2zulip

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ try:
2020

2121
setup_path()
2222
except ImportError:
23-
try:
24-
import scripts.lib.setup_path_on_import
25-
26-
scripts.lib.setup_path_on_import # Suppress unused import warning
27-
except ImportError:
28-
pass
23+
with contextlib.suppress(ImportError):
24+
import scripts.lib.setup_path_on_import # noqa: F401
2925

3026
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../"))
3127

0 commit comments

Comments
 (0)