diff options
author | Kevin Stock <kevin@kevinstock.org> | 2022-04-06 02:11:07 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 08:11:07 +0200 |
commit | c155bc4e52e313a51a03f9dcafa64b92701a6829 (patch) | |
tree | d2960c9b360f4e345e0c914d595e448ebbc49b27 /pygments/lexers/python.py | |
parent | 06923a1a47ea3cc0f742af23d7949bf17773e5c8 (diff) | |
download | pygments-git-c155bc4e52e313a51a03f9dcafa64b92701a6829.tar.gz |
Highlight python 3.10's EncodingWarning (#2106)
EncodingWarning was added in 3.10: https://docs.python.org/3/library/exceptions.html#EncodingWarning
Diffstat (limited to 'pygments/lexers/python.py')
-rw-r--r-- | pygments/lexers/python.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index f0cd9d7c..83c5ef4e 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -258,7 +258,8 @@ class PythonLexer(RegexLexer): 'InterruptedError', 'IsADirectoryError', 'NotADirectoryError', 'PermissionError', 'ProcessLookupError', 'TimeoutError', # others new in Python 3 - 'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError'), + 'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError', + 'EncodingWarning'), prefix=r'(?<!\.)', suffix=r'\b'), Name.Exception), ], |