text/x-python;application/x-python;text/x-python3
*.py;*.py3;*.pyi
#
.py
(?> (?: _ | \%{def:unicode-xid-start} ) \%{def:unicode-xid-continue}* )
[1-9][0-9]*
(\%{identifier}\.)*\%{identifier}
(\.*\%{identifier-path}|\.+)
% # leading % sign
\(\%{identifier}\)? # mapping key
[#0\-\ \+]* # conversion flags
(\-?\%{number}|\*)? # minimum field width
(\.(\-?\%{number}|\*))? # precision
(hlL)? # length modifier
[diouxXeEfFgGcrs%] # conversion type
\{
\}
(\{)
(\})
\{\{
(b|B)?
(r|R|rb|RB|rB|Rb|br|BR|bR|Br)
(f|F)
\%{string-prefix}"""
"""
\%{string-prefix}'''
'''
\%{string-prefix}"
"
\%{string-prefix}'
'
(\%{f-string-prefix}""")
(""")
.
(\%{f-string-prefix}''')
(''')
.
(\%{f-string-prefix}")
(")
.
(\%{f-string-prefix}')
(')
.
\%{raw-string-prefix}"""
"""
\%{raw-string-prefix}'''
'''
\%{raw-string-prefix}"
"
\%{raw-string-prefix}'
'
(from)
\s+
(\%{relative-path})
(def)
\s+
(\%{identifier})
(class)
\s+
(\%{identifier})
@\%{identifier-path}
(?<![\w\.])([1-9](_?[0-9])*|0)(?![\w\.])
(?<![\w\.])0[bB](_?[0-1])+(?![\w\.])
(?<![\w\.])0[oO](_?[0-7])+(?![\w\.])
(?<![\w\.])0[xX](_?[0-9A-Fa-f])+(?![\w\.])
async
await
nonlocal
^[ \t]*
(match|case)
\b(?![ \t]*[:,;=^&|@~\)\]\}])
(?<![\w\.])
BaseException
BaseExceptionGroup
BlockingIOError
BrokenPipeError
BufferError
BytesWarning
ChildProcessError
ConnectionAbortedError
ConnectionError
ConnectionRefusedError
ConnectionResetError
EncodingWarning
ExceptionGroup
FileExistsError
FileNotFoundError
GeneratorExit
ImportWarning
InterruptedError
IsADirectoryError
ModuleNotFoundError
NotADirectoryError
PermissionError
ProcessLookupError
RecursionError
ResourceWarning
StopAsyncIteration
TimeoutError
UnicodeWarning
(?<![\w\.])
aiter
anext
ascii
breakpoint
bytearray
bytes
exec
memoryview
next
print