PyCharm's (2022.1.2 Community Edition) code inspection complains that I could write some of my regular expressions as more simple equivalents. Considering unicode characters though (and why wouldn't I?), they are not equivalent. Am I mistaken, or is this simply a bug?
Example:
import re
# complains: "'[a-zA-Z0-9_]' can be simplified to '\w'"
pattern1 = re.compile("[a-zA-Z0-9_]")
pattern2 = re.compile(r"\w")
print(bool(pattern1.match("é"))) # False
print(bool(pattern2.match("é"))) # True