diff options
| author | Jean Abou-Samra <jean@abou-samra.fr> | 2022-01-31 22:00:40 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-31 22:00:40 +0100 |
| commit | c81e97c3c281492ac6fdf4abc841ac5b63f3f303 (patch) | |
| tree | 8d52ec56246f4d08a4eb0d16317cc5c261ebfd05 /pygments/lexers/python.py | |
| parent | b1edee0c8f736276a86e30d8edaed1f581e009d0 (diff) | |
| download | pygments-git-c81e97c3c281492ac6fdf4abc841ac5b63f3f303.tar.gz | |
Remove now redundant re.UNICODE and (?u) (#2058)
Diffstat (limited to 'pygments/lexers/python.py')
| -rw-r--r-- | pygments/lexers/python.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index a83bc92a..3b647fc8 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -61,8 +61,6 @@ class PythonLexer(RegexLexer): mimetypes = ['text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3'] - flags = re.MULTILINE | re.UNICODE - uni_name = "[%s][%s]*" % (uni.xid_start, uni.xid_continue) def innerstring_rules(ttype): @@ -214,7 +212,7 @@ class PythonLexer(RegexLexer): (r'(^[ \t]*)' # at beginning of line + possible indentation r'(match|case)\b' # a possible keyword r'(?![ \t]*(?:' # not followed by... - r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't + r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't r'|'.join(keyword.kwlist) + r')\b))', # pattern matching bygroups(Text, Keyword), 'soft-keywords-inner'), ], |
