From 0ea999b3484471884c0a49210998fdc86c90db70 Mon Sep 17 00:00:00 2001 From: Prakhar Pratyush Date: Tue, 30 May 2023 03:19:56 +0530 Subject: [PATCH] refactor: Convert the 'wildcards' list to a frozenset. This commit converts the 'wildcards' list to a frozenset, as we never intend to mutate 'wildcards'. --- zerver/lib/mention.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zerver/lib/mention.py b/zerver/lib/mention.py index 4657a8f844..0d03d27a7f 100644 --- a/zerver/lib/mention.py +++ b/zerver/lib/mention.py @@ -18,7 +18,7 @@ USER_GROUP_MENTIONS_RE = re.compile( rf"{BEFORE_MENTION_ALLOWED_REGEX}@(?P_?)(\*(?P[^\*]+)\*)" ) -wildcards = ["all", "everyone", "stream"] +wildcards = frozenset(["all", "everyone", "stream"]) @dataclass