a
    <Bìj]Ò  ã                   @   s0  d Z ddlZddlmZmZmZmZmZmZm	Z	m
Z
mZ ddlmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZ g d¢ZG dd	„ d	eƒZ e Z!G d
d„ deƒZ"G dd„ deƒZ#G dd„ deƒZ$G dd„ deƒZ%e%Z&G dd„ deƒZ'G dd„ deƒZ(G dd„ deƒZ)G dd„ de ƒZ*dS )zÙ
    pygments.lexers.python
    ~~~~~~~~~~~~~~~~~~~~~~

    Lexers for Python and related languages.

    :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)	ÚDelegatingLexerÚ
RegexLexerÚincludeÚbygroupsÚusingÚdefaultÚwordsÚcombinedÚthis)Úget_bool_optÚshebang_matches)ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚPunctuationÚGenericÚOtherÚErrorÚ
Whitespace)Ú	unistring)ÚPythonLexerÚPythonConsoleLexerÚPythonTracebackLexerÚPython2LexerÚPython2TracebackLexerÚCythonLexerÚDgLexerÚ
NumPyLexerc                $   @   s*  e Zd ZdZdZdZg d¢Zg d¢Zg d¢ZdZ	de
j› d	e
j› d
�Zdd„ Zdd„ Zdefdeeejejƒfdeeejejƒfdejfdejfdefdefedƒedƒdeeeƒdfdeeeƒdfdeejeƒdfdeejeƒdfed ƒgd!eejejƒed"d#ƒfd$eejejƒed"d%ƒfd&eejejƒed"d'ƒfd(eejejƒed"d)ƒfd*eejejƒed+d#ƒfd,eejejƒed+d%ƒfd-eejejƒed+d'ƒfd.eejejƒed+d)ƒfd/eejejƒd0fd1eejejƒd2fd3eejejƒd4fd5eejejƒd6fd7eejejƒed8d0ƒfd9eejejƒed8d2ƒfd:eejejƒed8d4ƒfd;eejejƒed8d6ƒfd<eejejƒed=d0ƒfd>eejejƒed=d2ƒfd?eejejƒed=d4ƒfd@eejejƒed=d6ƒfdAefedBƒdCefdDefdEej fedFƒedGƒedHƒedIƒedJƒgdKedLfdMej!dNfdOej!dNfdPefed ƒgdKedLfdQedNfdPefed ƒge"dRdSdT�efe"dUdSdT�ej#fge"dVdSdT�efe"dUdSdT�ej#fgdWdX $dYdZ„ e%j&D ƒ¡ d[ eeeƒd\fgd]eee'e(ƒeƒfe)dNƒge"d^d_dSd`�e*j+fdae*j+j,fe"dbd_dSd`�e*j-fge"dcdSdT�e*j.j/fge"dddSdT�e*j0j/fgdee1j2fdfe1j2fdge1j3fdhe1j4fdie1j5fdje1j6fgdke e*j7fdkefee*fgedHƒee*j.dNfe)dNƒgee*j8dNfgdleeeeƒfdme*jfee*jfdneeeeƒfe)dNƒgdoeeejƒdNfdme*jfdpej#dNfee*jfe)dNƒgdqej9fdrej9fged"ƒed8ƒgdsej9fgdtej9fed=ƒgeejƒeejƒeejƒeejƒduejdNfdvej9fedwƒgdxejdNfdyej9fedzƒgduejdNfdvej9fed{ƒgdxejdNfdyej9fed|ƒgd}ejdNfedwƒdejfgd~ejdNfedzƒdejfgd}ejdNfed{ƒdejfgd~ejdNfed|ƒdejfgdœ!Z:d€d�„ Z;d‚S )ƒr   z¹
    For Python source code (version 3.x).

    .. versionchanged:: 2.5
       This is now the default ``PythonLexer``.  It is still available as the
       alias ``Python3Lexer``.
    ÚPythonúhttps://www.python.org)ÚpythonÚpyZsageÚpython3Zpy3ZbazelZstarlarkZpyi)z*.pyz*.pywz*.pyiz*.jyz*.sagez*.scZ
SConstructZ
SConscriptz*.bzlZBUCKÚBUILDzBUILD.bazelZ	WORKSPACEz*.tac)ztext/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3ú0.10ú[z][z]*c                 C   s&   dt jfdt jfd| fd| fd| fgS )NzH%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]zg\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}z[^\\\'"%{\n]+ú[\'"\\]z%|(\{{1,2})©r   ÚInterpol©Úttype© r/   úa/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/pip/_vendor/pygments/lexers/python.pyÚinnerstring_rulesA   s    ÿüñzPythonLexer.innerstring_rulesc                 C   s"   dt jfdt jdfd| fd| fgS )Nz\}z\{úexpr-inside-fstringz[^\\\'"{}\n]+r*   r+   r-   r/   r/   r0   Úfstring_rulesU   s
    
÷zPythonLexer.fstring_rulesú\nú&^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")ú&^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')ú\A#!.+$ú#.*$ú\\\nú\\Úkeywordsúsoft-keywordsú(def)((?:\s|\\\s)+)Úfuncnameú(class)((?:\s|\\\s)+)Ú	classnameú(from)((?:\s|\\\s)+)Ú
fromimportú(import)((?:\s|\\\s)+)ÚimportÚexprz(?i)(rf|fr)(""")ÚrfstringescapeÚtdqfz(?i)(rf|fr)(''')Útsqfz(?i)(rf|fr)(")Údqfz(?i)(rf|fr)(')Úsqfz([fF])(""")Úfstringescapez([fF])(''')z	([fF])(")z	([fF])(')z(?i)(rb|br|r)(""")Útdqsz(?i)(rb|br|r)(''')Útsqsz(?i)(rb|br|r)(")Údqsz(?i)(rb|br|r)(')Úsqsz([uU]?)(""")Ústringescapez([uU]?)(''')z
([uU]?)(")z
([uU]?)(')z([bB])(""")Úbytesescapez([bB])(''')z	([bB])(")z	([bB])(')ú[^\S\n]+Únumbersz!=|==|<<|>>|:=|[-~+/*%=<>&^|.]ú[]{}:(),;[]ú(in|is|and|or|not)\búexpr-keywordsÚbuiltinsÚ
magicfuncsÚ	magicvarsÚnamez[{([]úexpr-inside-fstring-innerz(=\s*)?(\![sraf])?\}ú#popz(=\s*)?(\![sraf])?:ú\s+z[])}])z	async forÚawaitÚelseÚforÚifÚlambdaÚyieldú
yield fromú\b©Úsuffix)ÚTrueÚFalseÚNone)ÚassertÚasyncr^   ÚbreakÚcontinueÚdelÚelifr_   ÚexceptÚfinallyr`   Úglobalra   rb   ÚpassÚraiseÚnonlocalÚreturnÚtryÚwhilerc   rd   ÚasÚwithz6(^[ \t]*)(match|case)\b(?![ \t]*(?:[:,;=^&|@~)\]}]|(?:ú|c                 c   s   | ]}|d    ¡ r|V  qdS )r   N)Úislower)Ú.0Úkr/   r/   r0   Ú	<genexpr>â   ó    zPythonLexer.<genexpr>z)\b))úsoft-keywords-innerz(\s+)([^\n_]*)(_\b))CÚ
__import__ÚabsZaiterÚallÚanyÚbinÚboolÚ	bytearrayÚ
breakpointÚbytesÚcallableÚchrÚclassmethodÚcompileÚcomplexÚdelattrÚdictÚdirÚdivmodÚ	enumerateÚevalÚfilterÚfloatÚformatÚ	frozensetÚgetattrÚglobalsÚhasattrÚhashÚhexÚidÚinputÚintÚ
isinstanceÚ
issubclassÚiterÚlenÚlistÚlocalsÚmapÚmaxÚ
memoryviewÚminÚnextÚobjectÚoctÚopenÚordÚpowÚprintÚpropertyÚrangeÚreprÚreversedÚroundÚsetÚsetattrÚsliceÚsortedÚstaticmethodÚstrÚsumÚsuperÚtupleÚtypeÚvarsÚzipú(?<!\.)©Úprefixrg   z+(?<!\.)(self|Ellipsis|NotImplemented|cls)\b)EÚArithmeticErrorÚAssertionErrorÚAttributeErrorÚBaseExceptionÚBufferErrorÚBytesWarningÚDeprecationWarningÚEOFErrorÚEnvironmentErrorÚ	ExceptionÚFloatingPointErrorÚFutureWarningÚGeneratorExitÚIOErrorÚImportErrorÚImportWarningÚIndentationErrorÚ
IndexErrorÚKeyErrorÚKeyboardInterruptÚLookupErrorÚMemoryErrorÚ	NameErrorÚNotImplementedErrorÚOSErrorÚOverflowErrorÚPendingDeprecationWarningÚReferenceErrorÚResourceWarningÚRuntimeErrorÚRuntimeWarningÚStopIterationÚSyntaxErrorÚSyntaxWarningÚSystemErrorÚ
SystemExitÚTabErrorÚ	TypeErrorÚUnboundLocalErrorÚUnicodeDecodeErrorÚUnicodeEncodeErrorÚUnicodeErrorÚUnicodeTranslateErrorÚUnicodeWarningÚUserWarningÚ
ValueErrorÚVMSErrorÚWarningÚWindowsErrorÚZeroDivisionErrorÚBlockingIOErrorÚChildProcessErrorÚConnectionErrorÚBrokenPipeErrorÚConnectionAbortedErrorÚConnectionRefusedErrorÚConnectionResetErrorÚFileExistsErrorÚFileNotFoundErrorÚInterruptedErrorÚIsADirectoryErrorÚNotADirectoryErrorÚPermissionErrorÚProcessLookupErrorÚTimeoutErrorÚStopAsyncIterationÚModuleNotFoundErrorÚRecursionErrorZEncodingWarning)^Ú__abs__Ú__add__Ú
__aenter__Ú	__aexit__Ú	__aiter__Ú__and__Ú	__anext__Ú	__await__Ú__bool__Ú	__bytes__Ú__call__Ú__complex__Ú__contains__Ú__del__Ú__delattr__Ú
__delete__Ú__delitem__Ú__dir__Ú
__divmod__Ú	__enter__Ú__eq__Ú__exit__Ú	__float__Ú__floordiv__Ú
__format__Ú__ge__Ú__get__Ú__getattr__Ú__getattribute__Ú__getitem__Ú__gt__Ú__hash__Ú__iadd__Ú__iand__Ú__ifloordiv__Ú__ilshift__Ú__imatmul__Ú__imod__Ú__imul__Ú	__index__Ú__init__Ú__instancecheck__Ú__int__Ú
__invert__Ú__ior__Ú__ipow__Ú__irshift__Ú__isub__Ú__iter__Ú__itruediv__Ú__ixor__Ú__le__Ú__len__Ú__length_hint__Ú
__lshift__Ú__lt__Ú
__matmul__Ú__missing__Ú__mod__Ú__mul__Ú__ne__Ú__neg__Ú__new__Ú__next__Ú__or__Ú__pos__Ú__pow__Ú__prepare__Ú__radd__Ú__rand__Ú__rdivmod__Ú__repr__Ú__reversed__Ú__rfloordiv__Ú__rlshift__Ú__rmatmul__Ú__rmod__Ú__rmul__Ú__ror__Ú	__round__Ú__rpow__Ú__rrshift__Ú
__rshift__Ú__rsub__Ú__rtruediv__Ú__rxor__Ú__set__Ú__setattr__Ú__setitem__Ú__str__Ú__sub__Ú__subclasscheck__Ú__truediv__Ú__xor__)Ú__annotations__Ú	__bases__Ú	__class__Ú__closure__Ú__code__Ú__defaults__Ú__dict__Ú__doc__Ú__file__Ú__func__Ú__globals__Ú__kwdefaults__Ú
__module__Ú__mro__Ú__name__Ú__objclass__Ú__qualname__Ú__self__Ú	__slots__Ú__weakref__zT(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([eE][+-]?\d(?:_?\d)*)?z!\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?z0[oO](?:_?[0-7])+z0[bB](?:_?[01])+z0[xX](?:_?[a-fA-F0-9])+z\d(?:_?\d)*ú@ú(\s+)(as)(\s+)z\.ú(\s*)(,)(\s*)z(\s+)(import)\búNone\bz\{\{z\}\}z0\\([\\abfnrtv"\']|\n|x[a-fA-F0-9]{2}|[0-7]{1,3})z,\\(N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8})ú"ú\\\\|\\"|\\\núfstrings-doubleú'ú\\\\|\\'|\\\núfstrings-singleústrings-doubleústrings-singleú"""ú''')!ÚrootrE   r2   r[   rV   r;   r<   r‚   rW   rX   rY   rS   rZ   r>   r@   rD   rB   rF   rK   rQ   rP   r‡  r„  r‰  rˆ  rI   rJ   rN   rO   rG   rH   rL   rM   c                 C   s   t | dƒpd| d d… v S )Núpythonw?(3(\.\d)?)?úimport éè  ©r   ©Útextr/   r/   r0   Úanalyse_text˜  s    
ÿzPythonLexer.analyse_textN)<rx  rv  rz  rq  rZ   ÚurlÚaliasesÚ	filenamesÚ	mimetypesÚversion_addedÚuniZ	xid_startZxid_continueZuni_namer1   r3   r   r   r   ÚAffixÚDocr   ÚHashbangÚSingler   r   r   Ú	NamespaceÚDoubler	   r   r   ÚWordr,   r   ÚConstantÚjoinÚkeywordÚkwlistr   r
   r   r   ÚBuiltinÚPseudorÑ   ÚFunctionÚMagicÚVariabler   ÚFloatÚOctÚBinÚHexÚIntegerÚ	DecoratorÚClassÚEscapeÚtokensr“  r/   r/   r/   r0   r      s   ÿÿÿÿîþþþþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÄ?þþôüþýú	üûùûû
úþý
öõ
èçò*ëêÿûúÿ
ÿù
ý
ý
ÿû
ù
þþÿþ
ý
ý
ý
ý
ý
ý
ý
ý€ € Ò  7r   c                    @   sj  e Zd ZdZdZdZddgZg ZddgZdZ	d	d
„ Z
defdeeejejƒfdeeejejƒfdefdejfdejfdefdefdefdejfdefedƒdeeeƒdfdeeeƒdfdeejeƒdfdeejeƒdfedƒed ƒed!ƒed"ƒd#eejejƒd$fd%eejejƒd&fd'eejejƒd(fd)eejejƒd*fd+eejejƒed,d$ƒfd-eejejƒed,d&ƒfd.eejejƒed,d(ƒfd/eejejƒed,d*ƒfed0ƒed1ƒged2d3d4�efged5d6d3d7�ejfd8ejjfed9d6d3d7�ej fged:d3d4�ej!j"fged;d3d4�ej#j"fgd<e$j%fd=e$j%fd>e$j&fd?e$j'fd@e$j(fdAe$j)j*fdBe$j)fgdCej+fgdDej,fdEefged ƒdEej!dFfe-dFƒgdEej.dFfgdGefdHejfdIefdJejfe-dFƒgdGefdKejdFfdLejjdFfdMejfe-dFƒgdNej/fge
ejƒe
ejƒdOejdFfdPej/fedQƒgdRejdFfdSej/fedTƒgdUejdFfedQƒdejfgdVejdFfedTƒdejfgdWœZ0dXdY„ Z1dZS )[r   a  
    For Python 2.x source code.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonLexer``.  ``PythonLexer`` now
       refers to the Python 3 variant.  File name patterns like ``*.py`` have
       been moved to Python 3 as well.
    z
Python 2.xr#   Zpython2Zpy2ztext/x-python2zapplication/x-python2Ú c                 C   s   dt jfd| fd| fd| fgS )NúG%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]ú[^\\\'"%\n]+r*   ú%r+   r-   r/   r/   r0   r1   ±  s    ÿøzPython2Lexer.innerstring_rulesr4   r5   r6   rR   r7   r8   rT   r9   r:   rU   z!=|==|<<|>>|[-~+/*%=<>&^|.]r;   r=   r>   r?   r@   rA   rB   rC   rD   rW   rX   rY   Úbacktickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")rL   z!([rR]|[uUbB][rR]|[rR][uUbB])(''')rM   z([rR]|[uUbB][rR]|[rR][uUbB])(")rN   z([rR]|[uUbB][rR]|[rR][uUbB])(')rO   z([uUbB]?)(""")rP   z([uUbB]?)(''')z([uUbB]?)(")z([uUbB]?)(')rZ   rS   )rk   rm   rn   ro   rp   r_   rq   Úexecrr   r`   rs   ra   rb   rt   r³   ru   rw   rx   ry   rc   rd   rz   r{   re   rf   )Nrƒ   r„   r…   r†   ÚapplyÚ
basestringr‡   rˆ   Úbufferr‰   r‹   rŒ   r�   rŽ   ÚcmpÚcoercer�   r�   r‘   r’   r“   r”   r•   r–   ÚexecfileÚexitÚfiler—   r˜   rš   r›   rœ   r�   rž   rŸ   r    r¡   r¢   Úinternr£   r¤   r¥   r¦   r§   r¨   Úlongr©   rª   r¬   r­   r®   r¯   r°   r±   r²   r´   rµ   Ú	raw_inputÚreduceÚreloadr¶   r·   r¸   r¹   rº   r»   r¼   r½   r¾   r¿   rÀ   rÁ   rÂ   ÚunichrÚunicoderÃ   ÚxrangerÄ   rÅ   rÆ   z;(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b)1rÈ   rÉ   rÊ   rË   rÎ   rÏ   rÐ   rÑ   rÒ   rÓ   rÔ   rÕ   rÖ   r×   rØ   rÙ   rÚ   rÛ   rÜ   rÝ   rÞ   rß   rà   rá   ÚOverflowWarningrâ   rã   rå   ræ   ÚStandardErrorrç   rè   ré   rê   rë   rì   rí   rî   rï   rð   rñ   rò   ró   rô   rõ   rö   r÷   rø   rù   )_r  r  r  r  Z__cmp__Z
__coerce__r  r  r  r  r  r  Z__delslice__Z__div__r  r  r   r!  r"  r#  r%  r&  r'  r(  r)  Z__getslice__r*  r+  Z__hex__r,  r-  Z__idiv__r.  r/  r1  r2  r3  r4  r5  r6  r7  Z__iop__r8  r9  r:  r;  r<  r=  r>  r?  r@  Z__long__rB  rC  rE  rF  rG  rH  rI  rJ  Ú__nonzero__Z__oct__Z__op__rL  rM  rN  rP  rQ  Z__rcmp__Z__rdiv__rR  rS  rT  rU  rV  rX  rY  Z__rop__rZ  r\  r]  r^  r_  r`  ra  rb  rc  rd  Z__setslice__re  rf  rg  rh  Ú__unicode__ri  )rk  rl  rm  rn  ro  rp  rq  rr  rs  rt  Ú__metaclass__rv  rw  rx  r{  r|  r}  z'(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?z\d+[eE][+-]?[0-9]+j?z	0[0-7]+j?z
0[bB][01]+ú0[xX][a-fA-F0-9]+ú\d+Lz\d+j?ú`.*?`z@[\w.]+ú[a-zA-Z_]\w*r\   z(?:[ \t]|\\\n)+úas\bú,ú[a-zA-Z_][\w.]*zimport\br�  ú[a-zA-Z_.][\w.]*úY\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})r‚  rƒ  rˆ  r…  r†  r‰  rŠ  r‹  )rŒ  r;   rW   rX   rY   rS   r·  rZ   r>   r@   rD   rB   rP   r‰  rˆ  rN   rO   rL   rM   c                 C   s
   t | dƒS )Nzpythonw?2(\.\d)?r�  r‘  r/   r/   r0   r“  {  s    zPython2Lexer.analyse_textN)2rx  rv  rz  rq  rZ   r”  r•  r–  r—  r˜  r1   r   r   r   rš  r›  r   r   rœ  r�  r   r   r   r   r   rž  rŸ  r	   r   r   r¥  r¦  rÑ   r§  r¨  r©  r   rª  r«  r¬  r­  r®  ÚLongÚBacktickr¯  r   r°  r±  r²  r“  r/   r/   r/   r0   r      s0  	ÿÿÿÿÿÿÿÿÿÿÿÿÖ-üûÿ	ôóÿòñï#îíÿûúÿ

ù
ÿþ
ý
ÿû
öÿÿ
ý
ý
ý
ý€ Ê >r   c                   @   s¨   e Zd ZdZddgZdgZdeeje	j
ƒdfdeejeƒfde	jd	fd
e	jd	fdejfgdeeje	j
ƒfdeejeƒfedƒgdedfdeejeƒfde	jfgdœZdS )Ú_PythonConsoleLexerBaseúPython console sessionÚpyconúpython-consoleútext/x-python-doctestz(>>> )(.*\n)Úcontinuationsz	(>>>)(\n)z,(\^C)?Traceback \(most recent call last\):\nÚ	tracebackz  File "[^"]+", line \d+z.*\nz(\.\.\. )(.*\n)z(\.\.\.)(\n)r\   z(?=>>>( |$))z(KeyboardInterrupt)(\n))rŒ  rÞ  rß  N)rx  rv  rz  rZ   r•  r—  r   r   ZPromptr   ÚCoder   Ú	TracebackZOutputr   r   r   r°  r²  r/   r/   r/   r0   rÙ    s$   	

øü	ûïrÙ  c                       s:   e Zd ZdZdZddgZdgZdZdZ‡ fdd	„Z	‡  Z
S )
r   aü  
    For Python console output or doctests, such as:

    .. sourcecode:: pycon

        >>> a = 'foo'
        >>> print(a)
        foo
        >>> 1 / 0
        Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
        ZeroDivisionError: integer division or modulo by zero

    Additional options:

    `python3`
        Use Python 3 lexer for code.  Default is ``True``.

        .. versionadded:: 1.0
        .. versionchanged:: 2.5
           Now defaults to ``True``.
    rÚ  rÛ  rÜ  rÝ  úhttps://python.orgr³  c                    sT   t |ddƒ}|rt‰ t}nt‰ t}G ‡ fdd„dtƒ}tƒ j||tj	fi |¤Ž d S )Nr&   Tc                       s   e Zd Z‡ ‡fdd„Z‡  ZS )z6PythonConsoleLexer.__init__.<locals>._ReplaceInnerCodec                    s   t ƒ jˆttjfi |¤Ž d S ©N)rÀ   r4  rÙ  r   rà  )ÚselfÚoptions)rl  Úpylexerr/   r0   r4  Ð  s    z?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__)rx  rv  rz  r4  Ú__classcell__r/   ©ræ  ©rl  r0   Ú_ReplaceInnerCodeÏ  s   rê  )
r   r   r   r   r   r   rÀ   r4  r   rá  )rä  rå  r&   Ztblexerrê  ré  rè  r0   r4  Â  s    zPythonConsoleLexer.__init__)rx  rv  rz  rq  rZ   r•  r—  r”  r˜  r4  rç  r/   r/   ré  r0   r   ¤  s   r   c                   @   s   e Zd ZdZdZddgZddgZddgZd	Zd
Z	de
fdejdfdejfdejfdejdfdefgdeeejeeeee
ƒfdeeejeee
ƒfdee
eeƒe
ƒdfdee
ee
ƒfdeejeee
ƒdfdeeje
ƒdfedƒgdee
eje
ƒdfedƒgdœZdS )r   zå
    For Python 3.x tracebacks, with support for chained exceptions.

    .. versionchanged:: 2.5
       This is now the default ``PythonTracebackLexer``.  It is still available
       as the alias ``Python3TracebackLexer``.
    zPython TracebackZpytbZpy3tbz*.pytbz*.py3tbztext/x-python-tracebackztext/x-python3-tracebackrâ  z1.0r4   z-^(\^C)?Traceback \(most recent call last\):\nÚintbzH^During handling of the above exception, another exception occurred:\n\nzI^The above exception was the direct cause of the following exception:\n\nú^(?=  File "[^"]+", line \d+)ú^.*\nú0^(  File )("[^"]+")(, line )(\d+)(, in )(.+)(\n)ú%^(  File )("[^"]+")(, line )(\d+)(\n)ú^(    )(.+)(\n)Úmarkersú^([ \t]*)(\.\.\.)(\n)ú^([^:]+)(: )(.+)(\n)r\   z^([a-zA-Z_][\w.]*)(:?\n)z^( {4,})([~^]+)(\n))rŒ  rë  rñ  N)rx  rv  rz  rq  rZ   r•  r–  r—  r”  r˜  r   r   rá  r   r   r   r   r¥  r   r   r   r   r   r   r   ÚMarkerr²  r/   r/   r/   r0   r   Õ  sZ   
ÿÿ
øÿÿÿ
ÿÿÿóþùær   c                   @   sâ   e Zd ZdZdZdgZdgZdgZdZdZ	de
eejƒd	fd
ejd	fdefgde
eejeeeeeƒfde
eejeeeƒfde
eeeƒeƒdfde
eeeƒfde
ejeeeƒdfde
ejeƒdfgde
eejƒdfedƒgdœZdS )r   zÃ
    For Python tracebacks.

    .. versionchanged:: 2.5
       This class has been renamed from ``PythonTracebackLexer``.
       ``PythonTracebackLexer`` now refers to the Python 3 variant.
    zPython 2.x TracebackZpy2tbz*.py2tbztext/x-python2-tracebackrâ  z0.7z^(\^C)?(Traceback.*\n)rë  rì  rí  rî  rï  rð  Úmarkerrò  ró  r\   z^([a-zA-Z_]\w*)(:?\n)z( {4,})(\^))rŒ  rë  rõ  N)rx  rv  rz  rq  rZ   r•  r–  r—  r”  r˜  r   r   r   rá  r   r   r¥  r   r   r   r   r   r   r   rô  r   r²  r/   r/   r/   r0   r     sH   ÿ
ù
ÿÿÿ
ÿÿÿõýèr   c                !   @   sP  e Zd ZdZdZdZg d¢Zg d¢ZddgZdZ	d	e
fd
ee
ejƒfdee
ejƒfdefdefdefde
fdefdejfdeeejeƒfdefdeeejee
eeeƒfedƒdeee
ƒdfdeee
ƒdfdeeeƒfdeee
ƒdfdeee
ƒdfdeee
ƒd fed!ƒed"ƒd#ed$fd%ed&fd'ed(fd)ed*fd+eed,d$ƒfd-eed,d&ƒfd.eed,d(ƒfd/eed,d*ƒfed0ƒed1ƒged2d3d4�efd5ejfged6d7d3d8�ejfd9ejjfed:d7d3d8�ejfgd;ejfd<ej fd=ej!fd>ejj"fd?ejfgd@ej#fgdAej$fdBefgdBej%dCfgdDej&fdEefdFeej%e
ƒdCfdGeej%e
eƒfdHedCfdIefdJedCfdKedCfdBejfdLefg
dBej'dCfgdMee
ee
ƒfdNej(fdOee
ee
ƒfe)dCƒgdPee
eƒdCfdQej(fe)dCƒgdRej*fgdSej+fdTefdUefdVefgd	efgdWedCfdXej*fedYƒgdZedCfd[ej*fedYƒgd\edCfedYƒed]ƒgd^edCfedYƒed]ƒgd_œZ,d`S )ar   z+
    For Pyrex and Cython source code.
    ZCythonzhttps://cython.org)ZcythonZpyxZpyrex)z*.pyxz*.pxdz*.pxiztext/x-cythonzapplication/x-cythonz1.1r4   z^(\s*)("""(?:.|\n)*?""")z^(\s*)('''(?:.|\n)*?''')rR   r8   rT   r9   r:   rU   z(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)r;   z(def|property)(\s+)r>   z(cp?def)(\s+)Úcdefz	(cdef)(:)z(class|struct)(\s+)r@   z(from)(\s+)rB   z(c?import)(\s+)rD   rW   r·  z(?:[rR]|[uU][rR]|[rR][uU])"""rL   z(?:[rR]|[uU][rR]|[rR][uU])'''rM   z(?:[rR]|[uU][rR]|[rR][uU])"rN   z(?:[rR]|[uU][rR]|[rR][uU])'rO   z[uU]?"""rP   z[uU]?'''z[uU]?"z[uU]?'rZ   rS   )rk   rl   r^   rm   Zbyrn   Zctypedefro   rp   r_   rq   zexcept?r¸  rr   r`   ZfusedZgilrs   ra   r   rb   Znogilrt   r³   ru   rw   rx   ry   rc   rz   r{   re   rf   z(DEF|IF|ELIF|ELSE)\b)Qrƒ   r„   r…   r†   r¹  rº  r‡   Zbintrˆ   r»  r‰   r‹   rŒ   r�   rŽ   r¼  r½  r�   r�   r‘   r’   r“   r”   r•   r–   r¾  r¿  rÀ  r—   r˜   rš   r›   rœ   r�   rž   rŸ   r    r¡   r¢   rÁ  r£   r¤   r¥   r¦   r§   r¨   rÂ  r©   rª   r¬   r­   r®   r¯   r°   r±   r²   r´   Z
Py_ssize_trµ   rÃ  rÄ  rÅ  r¶   r·   r¸   r¹   rº   r»   r¼   r½   r¾   r¿   rÀ   rÁ   rÂ   rÆ  rÇ  ZunsignedrÃ   rÈ  rÄ   rÅ   rÆ   z<(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|NULL)\b)0rÈ   rÉ   rÊ   rË   rÎ   rÏ   rÐ   rÑ   rÒ   rÓ   rÔ   rÕ   rÖ   r×   rØ   rÙ   rÚ   rÛ   rÜ   rÝ   rÞ   ÚNotImplementedrß   rà   rá   rÉ  râ   rã   rå   ræ   rÊ  rç   rè   ré   rê   rë   rì   rí   rî   rï   rð   rñ   rò   ró   rô   rõ   r÷   rù   z&(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z0\d+rÎ  rÏ  z\d+rÐ  z@\w+rÑ  r\   z%(public|readonly|extern|api|inline)\bz(struct|enum|union|class)\bz([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)z([a-zA-Z_]\w*)(\s*)(,)zfrom\brÒ  ú:z	(?=["\'])Ú.r  rÔ  r€  z(\s+)(c?import)\brÕ  rÖ  zP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]rµ  r*   r¶  r‚  rƒ  Ústringsr…  r†  rŠ  Únlr‹  )rŒ  r;   rW   rS   r·  rZ   r>   rö  r@   rD   rB   rP   rú  rû  rN   rO   rL   rM   N)-rx  rv  rz  rq  rZ   r”  r•  r–  r—  r˜  r   r   r   r›  r   r   r   r   r   r   ÚTyper   r®  r   r   r	   r   ZPreprocr¥  r¦  rÑ   rª  r«  r­  r×  rØ  r¯  r§  ÚReservedr°  rž  r   r±  r,   r²  r/   r/   r/   r0   r   >  s  ÿÿÿÝ&üûù
ôóÿòñï#
ûÿþ
ÿÿÿô
ÿüüÿÿÿùÿýýýý€ ár   c                   @   s‚  e Zd ZdZdZdgZdgZdgZdZdZ	de
fdejfd	ejfd
ejfdejfdejfdejfdejfdeedddƒfdeedddƒfdeedddƒfdeedddƒfdefdejfdefedddd�ejfed ddd�ejfd!ejjfd"ejfd#ejfd$ejfd%efd&ejfd'efd(efd)e fgd*ej!fgd+ej"fd,efd-efd.efd/efgd0ed1fgd2ed1fgd3ed1fgd4ed1fgd5œZ#d6S )7r    zr
    Lexer for dg,
    a functional and object-oriented programming language
    running on the CPython 3 VM.
    Zdgz*.dgz	text/x-dgzhttp://pyos.github.io/dgz1.6r]   z#.*?$z(?i)0b[01]+z(?i)0o[0-7]+z(?i)0x[0-9a-f]+z((?i)[+-]?[0-9]+\.[0-9]+(e[+-]?[0-9]+)?j?z(?i)[+-]?[0-9]+e[+-]?\d+j?z(?i)[+-]?[0-9]+j?z(?i)(br|r?b?)'''rP   rM   Ústringz(?i)(br|r?b?)"""rL   z(?i)(br|r?b?)'rO   z(?i)(br|r?b?)"rN   z`\w+'*`z\b(and|in|is|or|where)\bz[!$%&*+\-./:<-@\\^|~;,]+)rˆ   r‰   r‹   rŽ   r�   r’   zdict'r˜   rš   r¢   r§   zlist'r«   r®   r´   rµ   r¹   zset'r»   r½   r¾   rÀ   rÁ   ztuple'rÂ   rÅ   z
(?![\'\w])rÆ   )=rƒ   r„   r…   r†   r‡   Úbindr�   r¼  r�   r�   r‘   r“   r”   ZdropÚ	dropwhiler•   r–   Zexhaustr—   Zflipzfoldl1?r™   Zfstr›   rœ   r�   rž   ÚheadrŸ   r    Úinitr¡   r£   r¤   r¥   ZiterateÚlastr¦   r¨   r©   rª   r¬   r­   r¯   r°   r±   r²   r³   r¶   r·   r¸   rº   zscanl1?Zsndr¼   r¿   ÚtailÚtakeÚ	takewhilerÃ   rÄ   z>(?<!\.)(self|Ellipsis|NotImplemented|None|True|False)(?!['\w])z3(?<!\.)[A-Z]\w*(Error|Exception|Warning)'*(?!['\w])zT(?<!\.)(Exception|GeneratorExit|KeyboardInterrupt|StopIteration|SystemExit)(?!['\w])z_(?<![\w.])(except|finally|for|if|import|not|otherwise|raise|subclass|while|with|yield)(?!['\w])z[A-Z_]+'*(?!['\w])z[A-Z]\w+'*(?!['\w])z\w+'*z[()]rù  rÖ  r´  rµ  r*   r¶  r4   r‚  r\   r…  rŠ  r‹  )rŒ  rP   rþ  rN   rO   rL   rM   N)$rx  rv  rz  rq  rZ   r•  r–  r—  r”  r˜  r   r   r�  r   r¬  r«  r­  rª  r®  r   r	   r   r   r   r   r¥  r¦  rÑ   r   rý  rü  r   r   r±  r,   r²  r/   r/   r/   r0   r    ñ  sŽ   ûú	÷
öÿÿÿÿÊ9ÿÿÿøÿÿÿÿ°r    c                   @   sB   e Zd ZdZdZdZdgZdZg Zg Z	h d£Z
dd„ Zd	d
„ ZdS )r!   z?
    A Python lexer recognizing Numerical Python builtins.
    ZNumPyzhttps://numpy.org/Únumpyr(   >‚  Zsort_complexÚfabsZstandard_normalZangleZinterpÚlogZright_shiftZunravel_indexÚmultiplyZhanningZpolyaddZarangeZaminZbyte_boundsÚfillZrot90ÚcopyZpoly1dZcovZarcsinhZvdotZcan_castZputmaskr»   ZwhoZarccosZpolyfitZravelZsavetxtZsetfieldÚ
fromstringZfromiterZ
frompyfuncZasfarrayÚtostringÚprodÚceilÚiterableZ	tensordotZlessZminimumr‹   ZpolymulZ	nanargmaxZ
frombufferZsometrueZ
seterrcallZndenumerateZ	ones_likeZtypeDictÚalenÚtolistZ
zeros_likeZrecarrayÚlogical_andZpinvZmintypecodeÚinfÚinsertÚtofileÚnegativeÚemptyZ	seterrobjZconcatenateZpolyZcrossZs_ZaverageZgeterrZplaceÚdotZ	nanargminÚimagZarray_equalZmedianZfftZmeshgridÚndimZclipZdsplitZ
bitwise_orÚdumpsÚfmodZix_Zexpand_dimsZnewbyteorderZc_ZmgridZdispÚmodfZvonmisesZreshapeZalltrueZtrue_divideÚindicesÚtanhÚtestÚmaximumZround_ZtriZsolveÚtraceZbitwise_andZhsplitÚlog1pZndindexZarray_splitÚcompressÚcoshÚshapeZrollaxisZasarray_chkfiniteZkaiserÚflattenZmay_share_memoryZissctypeÚsignÚ	getbufferÚ	not_equalZrandom_integersZfloor_divideÚ
logical_orZamaxrª   Ú	remainderZasmatrixÚlog2ÚsampleÚouterZascontiguousarrayÚselectZ
left_shiftZpermutationZarray2stringZmatrixZset_numeric_opsÚequalÚsizeZhistogram2dÚisnanÚitemZpolyvalZapply_over_axesÚexpm1Zintersect1dZargmaxZ
setbufsizeZbinary_reprZfromfunctionZvstackZkronZblackmanZcumprodZtileZ
geterrcallZ	histogramZ	piecewiseZisrealZsincZ
nan_to_numÚnanZdiagflatZ
trim_zerosZ	array_strZ
restoredotZarray_equivZargwhereÚinfoÚinvZbmatZ	newbufferÚseedÚarrayÚhypotZreal_if_closeÚvarZranfr  ÚdumpZnansumÚrootsÚputÚrandintrÄ  Zapply_along_axisZlogspaceZarctanhZpolysubZnanmaxÚrealZ	transposeZ
obj2sctypeÚaddZsetflagsZ	correlateÚuniqueZ
atleast_3dÚsortZlstsqÚidentityZasfortranarrayZargminÚshuffleZget_printoptionsZlinspaceZconvolveZdiagonalZget_numarray_includeÚsinÚabsoluteZbitwise_notZlexsortZswapaxesÚisinfZsvdZweibullZshow_configZeyeZcorrcoefZgetfieldZ
atleast_2dZfftfreqZ
less_equalZpolydivÚtanZr_ÚdivideZpkgloadZcumsumZ
array_reprZmsortZnewaxisZ	row_stackÚpowerZsquareÚcosZdiagZnanminZrankZ
reciprocalZ	base_reprÚloadsZptpZgumbelZ	iscomplexr¬   Zmaximum_sctypeZsetmember1dÚloadZhistogramddZfixÚsourceZisposinfÚ	conjugateÚsplitZbitwise_xorZ	index_expZi0ZdstackZarctan2ZsignbitZallcloseZlogical_notZstdÚ
accumulateZtriuZsctype2charÚtypenameZitemsetÚlogical_xorZasscalarZonesZastypeÚ	broadcastZfliplrr„   Z
getbufsizeÚdiffZ	isrealobjr¸   Zunion1dZgradientZtrapzZaroundZpolyintZflipudÚrequireZbinomialZset_printoptionsÚmeanr†   Zset_string_functionZrollZdtypeÚunwrapÚinnerZcompare_chararraysZhstackZsqueezeZvanderZediff1dÚviewZtrilÚrepeatZfftshiftÚbyteswapÚfrexpZ	isfortranÚbetaZiscomplexobjÚmatZsetxor1dZrintZsearchsortedÚresizeZogridÚwhereZisneginfÚfromfileZarccoshZrandom_sampleZnonzeroZcommon_typeZvsplitZget_numpy_includeZissubclass_ZgenericZarcsinÚinvertZarctanZconjZ
atleast_1dÚextractZflatZbincountZflatnonzeroÚlog10r¿   Z
arrayrangeZunique1dÚsinhZfastCopyAndTransposeÚldexpZget_array_wrapZargsortZalterdotZintersect1d_nuÚproductZisscalarZ	setdiff1dÚexpr…   ZhammingZ	vectorizeÚchooseZgreater_equalZpoissonÚfloorZ
asanyarrayZpolyderÚdeleteZ	geterrobjZloadtxtÚsqrtZfinfoZcolumn_stackÚuniformZ	deprecateÚsubtractZ
fromarraysZ
issubdtypeZissubsctypeZgreaterZdigitizeZget_includeZbartlettZasarrayZ
cumproductZ
empty_likeÚappendÚisfiniteÚzerosZifftZint_asbufferZseterrÚmodc                 c   sJ   t  | |¡D ]8\}}}|tu r8|| jv r8|tj|fV  q|||fV  qd S rã  )r   Úget_tokens_unprocessedr   ÚEXTRA_KEYWORDSr   r¦  )rä  r’  ÚindexÚtokenÚvaluer/   r/   r0   rx  ¥  s
    
ÿz!NumPyLexer.get_tokens_unprocessedc                 C   s.   | d d… }t | dƒsd|v o,d|v p,d|v S )Nr�  r�  rŽ  zimport numpyzfrom numpy importr�  )r’  Últextr/   r/   r0   r“  ­  s    
ÿþzNumPyLexer.analyse_textN)rx  rv  rz  rq  rZ   r”  r•  r˜  r—  r–  ry  rx  r“  r/   r/   r/   r0   r!   T  s   Cr!   )+rq  r£  Zpip._vendor.pygments.lexerr   r   r   r   r   r   r   r	   r
   Zpip._vendor.pygments.utilr   r   Zpip._vendor.pygments.tokenr   r   r   r   r   r   r   r   r   r   r   r   Zpip._vendor.pygmentsr   r™  Ú__all__r   ZPython3Lexerr   rÙ  r   r   ZPython3TracebackLexerr   r   r    r!   r/   r/   r/   r0   Ú<module>   s,   
,8    `%160 4c