Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

python: Remove unnecessary list comprehension.

BIKI DASad61d06cea3e
diff --git a/zerver/lib/webhooks/common.py b/zerver/lib/webhooks/common.py
index 37b11cc1001..5a7d41b9e37 100644
--- a/zerver/lib/webhooks/common.py
+++ b/zerver/lib/webhooks/common.py
@@ -100,10 +100,10 @@ def check_send_webhook_message(
# shell-style wildcards.
if (
only_events is not None
- and all([not fnmatch.fnmatch(complete_event_type, pattern) for pattern in only_events])
+ and all(not fnmatch.fnmatch(complete_event_type, pattern) for pattern in only_events)
) or (
exclude_events is not None
- and any([fnmatch.fnmatch(complete_event_type, pattern) for pattern in exclude_events])
+ and any(fnmatch.fnmatch(complete_event_type, pattern) for pattern in exclude_events)
):
return