� H�g-����dZddlZddlmZmZmZmZmZmZm Z m Z m Z ddl m Z mZddlmZmZmZmZmZmZmZmZmZmZmZmZddlmZgd�ZGd�d e��Z e Z!Gd �d e��Z"Gd �d e��Z#Gd�de��Z$Gd�de��Z%e%Z&Gd�de��Z'Gd�de��Z(Gd�de��Z)Gd�de ��Z*dS)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"���eZdZdZdZdZgd�Zgd�Zgd�ZdZ de j �d e j �d �Z d �Zd �Zid defdeeejej��fdeeejej��fdejfdejfdefdefed��ed��deee��dfdeee��dfdeeje��dfdeeje��dfed��g�dd eejej��ed!d"��fd#eejej��ed!d$��fd%eejej��ed!d&��fd'eejej��ed!d(��fd)eejej��ed*d"��fd+eejej��ed*d$��fd,eejej��ed*d&��fd-eejej��ed*d(��fd.eejej��d/fd0eejej��d1fd2eejej��d3fd4eejej��d5fd6eejej��ed7d/��fd8eejej��ed7d1��fd9eejej��ed7d3��fd:eejej��ed7d5��fd;eejej��ed<d/��fd=eejej��ed<d1��fd>eejej��ed<d3��fd?eejej��ed<d5��fd@efedA��dBefdCefdDej fedE��edF��edG��edH��edI��g�dJdKedLfdMej!dNfdOej!dNfdPefed��g�dLdKedLfdQedNfdPefed��g�dEe"dRdS�T��efe"dUdS�T��ej#fg�de"dVdS�T��efe"dUdS�T��ej#fg�ddWdX�$dY�e%j&D����zdZzeee��d[fg�d[d\eee'e(��e��fe)dN��g�dFe"d]d^dS�_��e*j+fd`e*j+j,fe"dad^dS�_��e*j-fg�dGe"dbdS�T��e*j.j/fg�dHe"dcdS�T��e*j0j/fg�dAdde1j2fdee1j2fdfe1j3fdge1j4fdhe1j5fdie1j6fg�dIdje ze*j7fdjefe e*fg�dedG��e e*j.dNfe)dN��g�de e*j8dNfg�ddkeeee��fdle*jfe e*jfdmeeee��fe)dN��g�ddneeej��dNfdle*jfdoej#dNfe e*jfe)dN��g�id!dpej9fdqej9fg�d*ed!��ed7��g�d<drej9fg�d7dsej9fed<��g�dteej���dueej���dveej���dweej���d&dxejdNfdyej9fedu��g�d(dzejdNfd{ej9fedt��g�d3dxejdNfdyej9fedw��g�d5dzejdNfd{ej9fedv��g�d"d|ejdNfedu��dejfg�d$d}ejdNfedt��dejfg�d/d|ejdNfedw��dejfg�d1d}ejdNfedv��dejfg��Z:d~�Z;dS)�rz� 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�py�sage�python3�py3�bazel�starlark�pyi)z*.pyz*.pywz*.pyiz*.jyz*.sagez*.sc� SConstruct� SConscriptz*.bzl�BUCK�BUILDz BUILD.bazel� WORKSPACEz*.tac)z text/x-pythonzapplication/x-pythonztext/x-python3zapplication/x-python3�0.10�[z][z]*c�L�dtjfdtjfd|fd|fd|fgS)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��ttypes �f/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pygments/lexers/python.py�innerstring_ruleszPythonLexer.innerstring_rulesAsF��'�(.�� 9���O�  %��u� %� �� � �U� #� � �c�H�dtjfdtjdfd|fd|fgS)Nz\}z\{�expr-inside-fstringz [^\\\'"{}\n]+r6r7r9s r;� fstring_ruleszPythonLexer.fstring_rulesUs5�� �F�O� $� �F�O�%:� ;� �u� %� �� �  � r=�root�\n�&^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")�&^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')�\A#!.+$�#.*$�\\\n�\\�keywordsz 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)\bz expr-keywords�builtins� magicfuncs� magicvars�namer?z[{([]zexpr-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�asyncri�break�continue�del�elifrj�except�finallyrk�globalrlrm�pass�raise�nonlocal�return�try�whilernro�as�withz6(^[ \t]*)(match|case)\b(?![ \t]*(?:[:,;=^&|@~)\]}]|(?:�|c#�NK�|] }|d����|V��!dS)rN)�islower)�.0�ks r;� <genexpr>zPythonLexer.<genexpr>�s3����C�C�Q�A�a�D�L�L�N�N�C�q�C�C�C�C�C�Cr=z)\b))zsoft-keywords-innerz(\s+)([^\n_]*)(_\b))C� __import__�abs�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�(?<!\.)��prefixrrz+(?<!\.)(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�RecursionError�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?z0[oO](?:_?[0-7])+z0[bB](?:_?[01])+z0[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})zfstrings-singlezfstrings-double�strings-single�strings-double�"� \\\\|\\"|\\\n�'� \\\\|\\'|\\\n�"""�'''c�:�t|d��p d|dd�vS)N�pythonw?(3(\.\d)?)?�import ���r ��texts r;� analyse_textzPythonLexer.analyse_text�s*���t�%;�<�<�%� ��e�t�e�� $� %r=N)<r�r�r�r}rf�url�aliases� filenames� mimetypes� version_added�uni� xid_start� xid_continue�uni_namer<r@rrr�Affix�Docr�Hashbang�Singlerrr� Namespace�Doubler rr�Wordr8r �Constant�join�keyword�kwlistrr rr�Builtin�Pseudor��Function�Magic�Variabler�Float�Oct�Bin�Hex�Integer� Decorator�Class�Escape�tokensr��r=r;rrsq �������� �D� "�C�T�T�T�G����I�,<�<�<�I��M�8�3�=�8�8�C�$4�8�8�8�H� � � �(  �  �  �s�� �J� � 6� �X�j�&�,�� � ;� ;� =� 6� �X�j�&�,�� � ;� ;� =� ��)� *� �g�n� %� �d�O� �D�M� �G�J� � � �G�O� $� $� #�X�X�g�z�%B�%B�J� O� %�x�x���'D�'D�k� R� $�h�h�w�/@�*�&M�&M� � � &����1B�J�(O�(O� � � �G�F�O�O�% �s�* � � �X�f�l�F�M� 2� 2� �X�&�� /� /� 1� � �X�f�l�F�M� 2� 2� �X�&�� /� /� 1�� �X�f�l�F�M� 2� 2� �X�&�� .� .� 0�� �X�f�l�F�M� 2� 2� �X�&�� .� .� 0��H�H�V�\�6�=�A�A� �X�o�v� .� .� 0� �H�H�V�\�6�=�A�A� �X�o�v� .� .� 0� �(�(�6�<���?�?� �X�o�u� -� -� /� �(�(�6�<���?�?� �X�o�u� -� -� /�"� �X�f�l�F�M� 2� 2�F� <� !� �X�f�l�F�M� 2� 2�F� <� � �X�f�l�F�M� 2� 2�E� ;� � �X�f�l�F�M� 2� 2�E� ;��X�X�f�l�F�M�B�B� �X�n�f� -� -� /� �X�X�f�l�F�M�B�B� �X�n�f� -� -� /� �8�8�F�L�&�-�@�@� �X�n�e� ,� ,� .� �8�8�F�L�&�-�@�@� �X�n�e� ,� ,� .��H�H�V�\�6�=�A�A� �X�m�V� ,� ,� .� �H�H�V�\�6�=�A�A� �X�m�V� ,� ,� .� �(�(�6�<���?�?� �X�m�U� +� +� -� �(�(�6�<���?�?� �X�m�U� +� +� -��$� � �G�I� � � .�� 9� �[� )� $�h�m� 4� �G�O� $� $� �G�J� � � �G�L� !� !� �G�K� � � �G�F�O�O�y= �+s�f � �{�$?� @���O�V� -� ��?�F� ,��Z� � �G�F�O�O� �gs�B $� �{�$?� @� �{�F� +� �Z� � �G�F�O�O� & �Cs�N � �U�'�/4�6�6�6�� ��U�,�U� ;� ;� ;�W�=M� N�  �Os�^ � �U�,�5:� ;�;�;� �  � �U�,�U� ;� ;� ;�W�=M� N� �_s�p �$� �Y�Y�C�C�'�.�C�C�C� C� C� D� GO� O� �X�d�G� $� $�&;�  =�  �qs�D � #�X�X�j�%�%��+�+�w�%O�%O� P� �G�F�O�O� �Es�N � �U� 0�9C�5� R� R� R��\� �<�T�\�=P� Q� �U�#�0"�%�11�1�1�2�^�3 �( �Os�` � �U��*$)�+*�*�*�,�]� �- "� �as�R � �U�8� AF� G�G�G� �]� �  "� �Ss�d �(�)/�� 7� 1�6�<� @� !�6�:� .� �&�*� -� '��� 4� �V�^� ,� �es�v � �H�_�d�n� -� �8� � �t� � �ws�@ � �G�L� !� !� �t�}�f� -� �G�F�O�O� �As�J � �t�z�6� *� �Ks�P � ����W�j� I� I� J� �D�N� #� �t�~� &� �x�x� �H�j�I�I� J� �G�F�O�O�  �Qs�^ � ���*�g�6G�!H�!H�&� Q� �D�N� #���(�&� 1� �t�~� &� �G�F�O�O� �_s�s�p � �f�m� $� �f�m� $� �qs�x � �G�$� %� %� �G�N� #� #� �ys�@ � @�&�-� P� �As�F � <�f�m� L� �G�M� "� "� �Gs�N �=�=���7�7�Os�P �=�=���7�7�Qs�R �+�+�F�M�:�:�Ss�T �+�+�F�M�:�:�Us�V � �6�=�&� )� �v�}� -� �G�%� &� &� �Ws�` � �6�=�&� )� �v�}� -� �G�%� &� &� �as�j � �6�=�&� )� �v�}� -� �G�$� %� %� �ks�t � �6�=�&� )� �v�}� -� �G�$� %� %� �us�~ � �V�]�F� +� �G�%� &� &� �F�M� "� �s�H � �V�]�F� +� �G�%� &� &� �F�M� "� �I s�R � �V�]�F� +� �G�$� %� %� �F�M� "� �S s�\ � �V�]�F� +� �G�$� %� %� �F�M� "� �] s�s�F�j %�%�%�%�%r=rc#���eZdZdZdZdZddgZgZddgZdZ d �Z id d e fd e e e je j��fd e e e je j��fdefdejfdejfdefdefdefdejfdefed��de ee ��dfde ee ��dfde eje ��dfde eje ��dfed��ed ��ed!��ed"��d#e e je j��d$fd%e e je j��d&fd'e e je j��d(fd)e e je j��d*fd+e e je j��ed,d$��fd-e e je j��ed,d&��fd.e e je j��ed,d(��fd/e e je j��ed,d*��fed0��ed1��g�ded2d3�4��efg�ded5d6d3�7��ejfd8ejjfed9d6d3�7��ej fg�d ed:d3�4��ej!j"fg�d!ed;d3�4��ej#j"fg�d1d<e$j%fd=e$j%fd>e$j&fd?e$j'fd@e$j(fdAe$j)j*fdBe$j)fg�d"dCe j+fg�d0dDej,fdEefg�ded ��dEej!dFfe-dF��g�ddEej.dFfg�ddGefdHejfdIefdJejfe-dF��g�ddGefdKejdFfdLejjdFfdMejfe-dF��g�d,dNe j/fg�dOe e j���dPe e j���d(dQe jdFfdRe j/fedP��g�d*dSe jdFfdTe j/fedO��g�dUe jdFfedP��d e jfgdVe jdFfedO��d e jfgdW��Z0dX�Z1dYS)Zra 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%�python2�py2ztext/x-python2zapplication/x-python2�c�2�dtjfd|fd|fd|fgS)N�G%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]� [^\\\'"%\n]+r6�%r7r9s r;r<zPython2Lexer.innerstring_rules�s4��&�'-�� 8��e� $� �� � �5�M�  � r=rArBrCrDr_rErFrarGrHrbz!=|==|<<|>>|[-~+/*%=<>&^|.]rIrJrKrLrMrNrOrPrQrcrdre�backtickz!([rR]|[uUbB][rR]|[rR][uUbB])(""")rYz!([rR]|[uUbB][rR]|[rR][uUbB])(''')rZz([rR]|[uUbB][rR]|[rR][uUbB])(")r[z([rR]|[uUbB][rR]|[rR][uUbB])(')r\z([uUbB]?)(""")r]z([uUbB]?)(''')z ([uUbB]?)(")z ([uUbB]?)(')rfr`)rvrxryrzr{rjr|�execr}rkr~rlrmrr�r�r�r�r�rnror�r�rprq)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�rrrrr)_rrrr"�__cmp__� __coerce__r#r$r%r&r'r(� __delslice__�__div__r*r+r,r-r.r/r1r2r3r4r5� __getslice__r6r7�__hex__r8r9�__idiv__r:r;r=r>r?r@rArBrC�__iop__rDrErFrGrHrIrJrKrL�__long__rNrOrQrRrSrTrUrV� __nonzero__�__oct__�__op__rXrYrZr\r]�__rcmp__�__rdiv__r^r_r`rarbrdre�__rop__rfrhrirjrkrlrmrnrorp� __setslice__rqrrrsrt� __unicode__ru)rwrxryrzr{r|r}r~rr�� __metaclass__r�r�r�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*rgz(?:[ \t]|\\\n)+�as\b�,�[a-zA-Z_][\w.]*zimport\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�)rYrZc�"�t|d��S)Nzpythonw?2(\.\d)?r�r�s r;r�zPython2Lexer.analyse_text{s���t�%8�9�9�9r=N)2r�r�r�r}rfr�r�r�r�r�r<rrrr�r�rrr�r�rrr�rrr�r�r r rr�r�r�r�r�r�rr�r�r�r�r��Long�Backtickr�rr�r�r�r�r�r=r;rr�s��������� �D� "�C��%� �G��I�!�#:�;�I��M�  �  �  �{�� �J� � 6� �X�j�&�,�� � ;� ;� =� 6� �X�j�&�,�� � ;� ;� =� �$� � ��)� *� �g�n� %� �[� )� �d�O� �D�M� $�h�m� 4� +�X� 6� �G�J� � � #�X�X�g�z�%B�%B�J� O� %�x�x���'D�'D�k� R� $�h�h�w�/@�*�&M�&M� � � &����1B�J�(O�(O� � � �G�J� � � �G�L� !� !� �G�K� � � �G�J� � � 0� �X�f�l�F�M� 2� 2�F� <� 0� �X�f�l�F�M� 2� 2�F� <� .� �X�f�l�F�M� 2� 2�E� ;� .� �X�f�l�F�M� 2� 2�E� ;� �x�x�� �f�m�D�D� �X�n�f� -� -� /� �x�x�� �f�m�D�D� �X�n�f� -� -� /� �X�X�f�l�F�M�B�B� �X�n�e� ,� ,� .� �X�X�f�l�F�M�B�B� �X�n�e� ,� ,� .� �G�F�O�O� �G�I� � �U+ �{�Z � �U�,�5:� ;�;�;� �  � �[{�j � �U� >�"�%� 1� 1� 1��\� ���\�(� *� �U�5�>H�PU�W�W�W��^� �#! �k{�n � �U�*�$38�%9�9�9�&�]� �' "� �o{�Z � �U�,� � ��� �]� �  "� �[{�l � 7��� F� $�f�l� 3� �6�:� &� �F�J� '� !�6�:� .� �f�n�)� *� �v�~� &� �m{�~ � �f�o� &� �{�D � ��� (� �d� #� �E{�L � �G�L� !� !� �d�m�V� 4� �G�F�O�O� �M{�V � �d�j�&� 1� �W{�\ � �� &� �g�'� (� �8� � ��� 0� �G�F�O�O�  �]{�j � �� &� �'�+�V� 4��� �+�V� 4� �$�.� 1� �G�F�O�O�  �k{�B �<�=C�]� L� �C{�J �+�+�F�M�:�:�K{�L �+�+�F�M�:�:�M{�N � �6�=�&� )� �v�}� -� �G�$� %� %� �O{�X � �6�=�&� )� �v�}� -� �G�$� %� %� �Y{�d�V�]�F� +� �G�$� %� %� �F�M� "� � �V�]�F� +� �G�$� %� %� �F�M� "� �m{�{�{�F�z:�:�:�:�:r=rc�X�eZdZdZddgZdgZ deeje j ��dfdeeje ��fde j d fd e j d fd ej fgd eeje j ��fd eeje ��fed��gdedfdeeje ��fd e j fgd�ZdS)�_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)rgz (?=>>>( |$))z(KeyboardInterrupt)(\n))rArrN)r�r�r�rfr�r�rr�Promptr�Coder� Traceback�Outputrrrr�r�r�r=r;r�r�s������ #�D��(�)�G�(�)�I���h�h�w�~�u�z�B�B�O� T��8�8�G�N�J�?�?� @� <�e�o�{� [� (�%�/�;� G� �g�n� %�  � ���'�.�%�*�!E�!E� F� �h�h�w�~�z�B�B� C� �G�F�O�O�  ��d�F� +� '���$�*�j�)I�)I� J� �e�o� &�  �#��F�F�Fr=r�c�<��eZdZdZdZddgZdgZdZdZ�fd�Z �xZ S) ra� 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 �����t|dd��}|rt�t}nt�t}G�fd�dt ��}t ��j||tj fi|��dS)Nr)Tc�"���eZdZ��fd�Z�xZS)�6PythonConsoleLexer.__init__.<locals>._ReplaceInnerCodec�^��t��j�ttjfi|��dS�N)r�r@r�rr)�self�optionsrx�pylexers ��r;r@z?PythonConsoleLexer.__init__.<locals>._ReplaceInnerCode.__init__�s0��� ���� ��*A�5�:�Y�Y�QX�Y�Y�Y�Y�Yr=)r�r�r�r@� __classcell__)rxrs@�r;�_ReplaceInnerCoder �sH�������� Z� Z� Z� Z� Z� Z� Z� Z� Z� Zr=r) r rrrrrr�r@rr)rrr)�tblexerrrrxs @�r;r@zPythonConsoleLexer.__init__�s������w� �4�8�8�� � ,�!�G�*�G�G�"�G�+�G�  Z� Z� Z� Z� Z� Z� Z�� Z� Z� Z� ������"3�U�_�P�P��P�P�P�P�Pr=) r�r�r�r}rfr�r�r�r�r@r)rxs@r;rr�so���������. $�D��(�)�G�(�)�I� �C��M�Q�Q�Q�Q�Q�Q�Q�Q�Qr=rc ���eZdZdZdZddgZddgZddgZd Zd Z d e fd e j d fde j fde j fde j d fde fgdeeejeeeee ��fdeeejeee ��fdee ee��e ��dfdee ee ��fdee jeee ��dfdee je ��dfed��gdee eje ��dfed��gd�ZdS)rz� 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``. zPython Traceback�pytb�py3tbz*.pytbz*.py3tbztext/x-python-tracebackztext/x-python3-tracebackrz1.0rBz-^(\^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)rgz^([a-zA-Z_][\w.]*)(:?\n)z^( {4,})([~^]+)(\n))rArrN)r�r�r�r}rfr�r�r�r�r�rrrrrrrr�rrrrrrr�Markerr�r�r=r;rr�s��������� �D��w��G��9�%�I�*�,F�G�I� �C��M��J� � =�w�?P�RX� Y�(�)0�):� <�)�*1�*;� =� -�w�/@�&� I� �u� �  �A� �X�d�D�L�$���d�J� O� O� Q� 5� �X�d�D�L�$�� � C� C� E� � �X�j�%�%� �"4�"4�j� A� A�9� N� %� �X�j�'�:� 6� 6� 8� $� �X�g�m�T�4�� <� <�f� F� (� �X�g�m�Z� 0� 0�&� :� �G�F�O�O� �&$� �X�j�+�"4�j� A� A� � � �G�F�O�O� �5#�#�F�F�Fr=rc ��eZdZdZdZdgZdgZdgZdZdZ de e e j ��d fd e j d fd efgd e e eje ee ee��fd e e eje ee��fde e ee��e��dfde e ee��fde e je ee��dfde e je��dfgde e ej��dfed��gd�ZdS)rz� For Python tracebacks. .. versionchanged:: 2.5 This class has been renamed from ``PythonTracebackLexer``. ``PythonTracebackLexer`` now refers to the Python 3 variant. zPython 2.x Traceback�py2tbz*.py2tbztext/x-python2-tracebackrz0.7z^(\^C)?(Traceback.*\n)rrrrrr�markerrrrgz^([a-zA-Z_]\w*)(:?\n)z ( {4,})(\^))rArr#N)r�r�r�r}rfr�r�r�r�r�rrrrrrr�rrrrrrrr rr�r�r=r;rrsv�������� "�D��i�G�� �I�+�,�I� �C��M� '� �X�d�G�-� .� .�� 8�.�w�/@�&� I� �u� � �A� �X�d�D�L�$���d�J� O� O� Q� 5� �X�d�D�L�$�� � C� C� E� � �X�d�E�E�,�/�/�� <� <�h� H� %� �X�d�G�Z� 0� 0� 2� $� �X�g�m�T�4�� <� <�f� F� %� �X�g�m�Z� 0� 0�&� :�  � �X�X�d�K�,>�?�?�� H� �G�F�O�O� �1��F�F�Fr=rc ��eZdZdZdZdZgd�Zgd�ZddgZdZ id gd e f�d e e e j ��f�d e e e j ��f�d ef�def�def�de f�def�dejf�de eeje��f�def�de eejee eee��f�ed���de ee ��df�de ee ��df�de ee��f�de ee ��df�de ee ��df�d e ee ��d!f�ed"���ed#���d$e d%f�d&e d'f�d(e d)f�d*e d+f�d,e ed-d%��f�d.e ed-d'��f�d/e ed-d)��f�d0e ed-d+��f�ed1���ed2����ded3d4�5��efd6ejfg�d"ed7d8d4�9��ejfd:ejjfed;d8d4�9��ejfg�d2d<ejfd=ej fd>ej!fd?ejj"fd@ejfg�d#dAe j#fg�d1dBej$fdCefg�ddCej%dDfg�ddEej&fdFefdGe ej%e ��dDfdHe ej%e e��fdIedDfdJefdKedDfdLedDfdCejfdMefg �ddCej'dDfg�d!dNe e ee ��fdOej(fdPe e ee ��fe)dD��g�ddQe e e��dDfdRej(fe)dD��g�d-dSe j*fg�dTdUe j+fdVe fdWe fdXe fg�dYd e fg�d)dZe dDfd[e j*fedT��g�d+d\e dDfd]e j*fedT��g�d%d^e dDfedT��edY��g�d'd_e dDfedT��edY��gi�Z,d`S)ar z+ For Pyrex and Cython source code. �Cythonzhttps://cython.org)�cython�pyx�pyrex)z*.pyxz*.pxdz*.pxiz text/x-cythonzapplication/x-cythonz1.1rArBz^(\s*)("""(?:.|\n)*?""")z^(\s*)('''(?:.|\n)*?''')r_rFrarGrHrbz(<)([a-zA-Z0-9.?]+)(>)z!=|==|<<|>>|[-~+/*%=<>&^|.?]z(from)(\d+)(<=)(\s+)(<)(\d+)(:)rIz(def|property)(\s+)rKz (cp?def)(\s+)�cdefz (cdef)(:)z(class|struct)(\s+)rMz (from)(\s+)rOz(c?import)(\s+)rQrcr�z(?:[rR]|[uU][rR]|[rR][uU])"""rYz(?:[rR]|[uU][rR]|[rR][uU])'''rZz(?:[rR]|[uU][rR]|[rR][uU])"r[z(?:[rR]|[uU][rR]|[rR][uU])'r\z[uU]?"""r]z[uU]?'''z[uU]?"z[uU]?'rfr`)rvrwrirx�byry�ctypedefrzr{rjr|zexcept?r�r}rk�fused�gilr~rlrrm�nogilrr�r�r�r�r�rnr�r�rprqz(DEF|IF|ELIF|ELSE)\b)Qr�r�r�r�r�r�r��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�� Py_ssize_tr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��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�rrrz&(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?z0\d+r�r�z\d+r�z@\w+r�rgz%(public|readonly|extern|api|inline)\bz(struct|enum|union|class)\bz([a-zA-Z_]\w*)(\s*)(?=[(:#=]|$)z([a-zA-Z_]\w*)(\s*)(,)zfrom\br��:z (?=["\'])�.r�r�r�z(\s+)(c?import)\br�r��stringszP%(\([a-zA-Z0-9]+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]r�r6r��nlr�r�r�r�r�r�N)-r�r�r�r}rfr�r�r�r�r�rrrr�rrrrr�r�Typerr�rrr r �Preprocr�r�r�r�r�r�r�r�r�r��Reservedr�r�rr�r8r�r�r=r;r r >s(�������� �D� �C�(�(�(�G�+�+�+�I� �"8�9�I��M�d��$ � �J� �$ � (�(�(�:�v�z�*J�*J� K�$ �)�(�(�:�v�z�*J�*J� K�$ ��$� � $ � �g� � $ � �[� )� $ ��j� !�$ ��D�M�$ �%�h�m� 4�$ �'� �X�k�7�<�� =� =� ?�$ �-�h� 7�$ �0� �X�g�v�~�x��X��K�)�)� *�$ � �G�J� � �!$ �"$�X�X�g�z�%B�%B�J� O�#$ �$�x�x���<�<�f� E�%$ �(�8�8�G�[�9�9� :�)$ �*$�X�X�g�z�%B�%B�K� P�+$ �,�X�X�g�z�:�:�L� I�-$ �. ���'�:�!>�!>�� I�/$ �0 �G�J� � �1$ �2 �G�J� � �3$ �4-�f�f� =�5$ �6-�f�f� =�7$ �8+�F�E� :�9$ �:+�F�E� :�;$ �<����.�&�!A�!A� B�=$ �>����.�&�!A�!A� B�?$ �@�v�x�x���>�>� ?�A$ �B�v�x�x���>�>� ?�C$ �D �G�F�O�O�E$ �F �G�I� � �G$ �d�L � �U�J�SX� Y�Y�Y� �  � %�g�o� 6� �Md�^ � �U� )�2<�E� K� K� K��\� ���\�(� *� �U�%�.8��G�G�G��^� �#! �_d�b � 6�� � E� �f�j� !� !�6�:� .� �f�n�)� *� �V�^� $�  �cd�p � �f�o� &� �qd�v � �d�n� %� �d� #� �wd�~ � �d�m�V� 4� �d�D � 5�w�7G� H� +�W� 5� /� �X�d�m�Z� 0� 0�&� :� &� �X�d�m�Z�� =� =� ?� ��� (� �g� � �;�� '� �4�� (� �g�l� +� �4�L�  �Ed�` � �d�j�&� 1� �ad�f � ����W�j� I� I� J� ��� 0� �x�x� �H�j�I�I� J� �G�F�O�O�  �gd�r � !�8�8�J��#@�#@�&� I� �$�.� 1� �G�F�O�O�  �sd�~ �<�=C�]� L� �d�F �&�'-�� 8� �f� %� �� � �6�N�  �Gd�Z � �F�O� �[d�` � �6�6� "� �v�}� -� �G�I� � � �ad�j � �6�6� "� �v�}� -� �G�I� � � �kd�t � �V�V� $� �G�I� � � �G�D�M�M� �ud�~ � �V�V� $� �G�I� � � �G�D�M�M� �d�d�F�F�Fr=r c�h�eZdZdZdZdgZdgZdgZdZdZ de fde j fd e jfd e jfd e jfd e jfd e jfde jfdeeddd��fdeeddd��fdeeddd��fdeeddd��fdefdejfdefeddd���ejfed dd���ejfd!ejjfd"ejfd#ejfd$ejfd%efd&ejfd'efd(efd)e fgd*ej!fgd+ej"fd,efd-efd.efd/efgd0ed1fgd2ed1fgd3ed1fgd4ed1fgd5�Z#d6S)7r!zr Lexer for dg, a functional and object-oriented programming language running on the CPython 3 VM. �dgz*.dgz text/x-dgzhttp://pyos.github.io/dgz1.6rhz#.*?$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?)'''r]rZ�stringz(?i)(br|r?b?)"""rYz(?i)(br|r?b?)'r\z(?i)(br|r?b?)"r[z`\w+'*`z\b(and|in|is|or|where)\bz[!$%&*+\-./:<-@\\^|~;,]+)r�r�r�r�r�r�zdict'r�r�r�r�zlist'r�r�r�r�r�zset'r�r�r�r�r�ztuple'r�r�z (?![\'\w])r�)=r�r�r�r�r��bindr�r�r�r�r�r�r��drop� dropwhiler�r��exhaustr��flipzfoldl1?r��fstr�r�r�r��headr�r��initr�r�r�r��iterate�lastr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�zscanl1?�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[()]r4r�r�r�r6r�rBr�rgr�r�r�)rAr]r<r[r\rYrZN)$r�r�r�r}rfr�r�r�r�r�rrr�rr�r�r�r�r�rr rr�r rr�r�r�rr9r7rrr�r8r�r�r=r;r!r!�sq�������� �D��f�G���I�� �I� $�C��M��T�N� �w�~� &� �V�Z� (� �f�j� )� ��� ,� 8�&�,� G� *�F�L� 9� !�6�>� 2� �&�(�(�>�6�8�*T�*T� U� �&�(�(�>�6�8�*T�*T� U� �������(Q�(Q� R� �������(Q�(Q� R� �� "� (�(�-� 8� (�(� 3� �U�5� %�]� <�<�<� �\�  ��U�M�%�]� <� <� <��\� �O� �\� � "�D� �^� �%�&*�n� 6�4�5<�5E� G�#�D� )� #�W�\� 2� �t� � �k� "� �5�M�m7 �r<�=C�]� L� � &�'-�� 8� �f� %� �� � �6�N� �F�O�  ��6�6� "� ��6�6� "� ��V�V� $� ��V�V� $� �aS�S�F�F�Fr=r!c�@�eZdZdZdZdZdgZdZgZgZ hd�Z d�Z d�Z d S) r"z? A Python lexer recognizing Numerical Python builtins. �NumPyzhttps://numpy.org/�numpyr3>��c_�i0�r_�s_r��addr�r��cos�cov�dot�exp�eye�fft�fix�inf�inv�ix_�log�matr�r��mod�nan�ptp�put�sin�stdr��svd�tan�tri�var�who�alen�amax�amin�beta�bmat�ceil�clip�conj�copy�cosh�diag�diff�disp�dump�fabs�fill�flat�fmod�ifft�imag�info�item�kron�less�load�log2�mean�modf�ndim�ones�pinv�poly�prod�ranf�rank�real�rint�roll�seed�sign�sinc�sinh�size�sort�sqrtrI�tanh�test�tile�tril�triu�vdot�view�angle�arrayr��cross�dtype�dumps�empty�equal�expm1�finfo�floor�frexp�hypot�inner�isinf�isnan�ldexp�loads�log10�log1p�lstsq�mgrid�msort�ogrid�outer�place�power�ravel�roots�rot90r��shaper��solve�split�trace�trapz�where�zeros�append�arange�arccos�arcsin�arctan�argmax�argmin�around�astype�choose�cumsum�delete�divide�dsplit�dstack�fliplr�flipud�geterr�gumbel�hsplit�hstack�insert�interp�invert�isreal�kaiser�matrix�median�nanmax�nanmin�nansum�poly1dr��repeat�resize�round_�sample�select�seterr�source�square�tofile�tolist�unique�unwrap�vander�vsplit�vstack�alltrue�arccosh�arcsinh�arctan2�arctanh�argsort�asarray�average�cumprod�ediff1d�extract�fftfreq�flatten�generic�greater�hamming�hanning�indices�itemset�lexsort�loadtxt�maximum�minimum�ndindex�newaxis�nonzero�pkgload�poisson�polyadd�polyder�polydiv�polyfit�polyint�polymul�polysub�polyval�product�putmask�randint�require�reshape�savetxt�shuffle�signbit�squeeze�uniform�union1d�weibull�absolute�allclose�alterdot�argwhere�asfarray�asmatrix�asscalar�bartlett�bincount�binomial�blackman�byteswap�can_cast�compress�convolve�corrcoef�diagflat�diagonal�digitize�fftshift�fromfile�fromiter�getfield�gradient�identity�isfinite�isneginf�isposinf�isscalar�issctype�iterable�linspace�logspace�meshgrid�multiply�negative�recarray�rollaxis�setfield�setflags�setxor1d�sometrue�subtract�swapaxes�tostring�typeDict�typename�unique1d�vonmises� array_str� base_repr� broadcast� conjugate� correlate� deprecate� getbuffer� geterrobj� histogram� index_exp� iscomplex� isfortran� isrealobj� nanargmax� nanargmin� newbuffer� not_equal� ones_like� piecewise� remainder� row_stack� setdiff1d� seterrobj� tensordot� transpose� vectorize� accumulate� array_repr� arrayrange� asanyarray� atleast_1d� atleast_2d� atleast_3d� bitwise_or� cumproduct� empty_like� fromarrays� frombuffer� frompyfunc� fromstring� getbufsize� geterrcall� issubdtype� left_shift� less_equal� logical_or� nan_to_num� obj2sctype� reciprocal� restoredot� setbufsize� seterrcall� trim_zeros� zeros_like� array_equal� array_equiv� array_split� binary_repr� bitwise_and� bitwise_not� bitwise_xor� byte_bounds� common_type� concatenate� expand_dims� flatnonzero� get_include� histogram2d� histogramdd� intersect1d� issubclass_� issubsctype� logical_and� logical_not� logical_xor� mintypecode� ndenumerate� permutation� right_shift� sctype2char� setmember1d� show_config� true_divide� array2string� column_stack� floor_divide� fromfunction� int_asbuffer� iscomplexobj� newbyteorder� searchsorted� sort_complex� greater_equal� random_sample� real_if_close� unravel_index�asfortranarray�get_array_wrap�intersect1d_nu�maximum_sctype�apply_over_axes�random_integers�set_numeric_ops�standard_normal�apply_along_axis�get_printoptions�may_share_memory�set_printoptions�asarray_chkfinite�ascontiguousarray�get_numpy_include�compare_chararrays�set_string_function�fastCopyAndTranspose�get_numarray_includec#�K�t�||��D]1\}}}|tur||jvr|tj|fV��*|||fV��2dSr )r�get_tokens_unprocessedr�EXTRA_KEYWORDSrr�)rr��index�token�values r;r�z!NumPyLexer.get_tokens_unprocessed�sz�����2�2�4��>�>� *� *� �E�5�%���}�}��$�*=�!=�!=��W�^�U�2�2�2�2�2��U�E�)�)�)�)�)�  *� *r=c�N�|dd�}t|d��sd|vod|vpd|vS)Nr�r�r�z import numpyzfrom numpy importr�)r��ltexts r;r�zNumPyLexer.analyse_text�sI���U�d�U� ����&<�=�=�#��U�"�J��5�(�H�,?�5�,H� Jr=N) r�r�r�r}rfr�r�r�r�r�r�r�r�r�r=r;r"r"Tsz�������� �D� �C��i�G��M��I��I�A�A�A�N�F*�*�*�J�J�J�J�Jr=r")+r}r��pygments.lexerrrrrrrr r r � pygments.utilr r �pygments.tokenrrrrrrrrrrrr�pygmentsrr��__all__r� Python3Lexerrr�rr�Python3TracebackLexerrr r!r"r�r=r;�<module>r�s&��������4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�4�7�7�7�7�7�7�7�7�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�;�%�%�%�%�%�%� 3� 3� 3�� A%�A%�A%�A%�A%�*�A%�A%�A%�H � �\:�\:�\:�\:�\:�:�\:�\:�\:�~"�"�"�"�"�j�"�"�"�J.Q�.Q�.Q�.Q�.Q��.Q�.Q�.Q�b3�3�3�3�3�:�3�3�3�l-��-�-�-�-�-�J�-�-�-�`p�p�p�p�p�*�p�p�p�f`�`�`�`�`�j�`�`�`�F]J�]J�]J�]J�]J��]J�]J�]J�]J�]Jr=
Memory