Skip to content

Commit 551023c

Browse files
derek73claude
andcommitted
Suppress CodeQL false positive on emoji regex
U+FFFD (65533) is numerically below all ranges in re_emoji — verified by testing that the regex does not match the character. CodeQL's py/overly-large-range heuristic fires on large Unicode ranges without checking actual codepoint overlap. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 3dc1f8f commit 551023c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nameparser/config/regexes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import re
22

33
# emoji regex from https://stackoverflow.com/questions/26568722/remove-unicode-emoji-using-re-in-python
4-
re_emoji = re.compile('['
4+
re_emoji = re.compile('[' # lgtm[py/overly-large-range]
55
'\U0001F300-\U0001F64F'
66
'\U0001F680-\U0001F6FF'
77
'\u2600-\u26FF\u2700-\u27BF]+',

0 commit comments

Comments
 (0)