Skip to content

Commit c155bc4

Browse files
authored
Highlight python 3.10's EncodingWarning (#2106)
EncodingWarning was added in 3.10: https://docs.python.org/3/library/exceptions.html#EncodingWarning
1 parent 06923a1 commit c155bc4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pygments/lexers/python.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def fstring_rules(ttype):
258258
'InterruptedError', 'IsADirectoryError', 'NotADirectoryError',
259259
'PermissionError', 'ProcessLookupError', 'TimeoutError',
260260
# others new in Python 3
261-
'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError'),
261+
'StopAsyncIteration', 'ModuleNotFoundError', 'RecursionError',
262+
'EncodingWarning'),
262263
prefix=r'(?<!\.)', suffix=r'\b'),
263264
Name.Exception),
264265
],

0 commit comments

Comments
 (0)