403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/jedi/inference/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/jedi/inference/__pycache__/recursion.cpython-311.pyc
�

p�{cD���dZddlmZddlmZddlmZdZ	dZ	dZ		dZ
	Gd	�d
��Zed���Zefd�Z
Gd
�d��ZdS)a
Recursions are the recipe of |jedi| to conquer Python code. However, someone
must stop recursions going mad. Some settings are here to make |jedi| stop at
the right time. You can read more about them :ref:`here <settings-recursion>`.

Next to the internal ``jedi.inference.cache`` this module also makes |jedi| not
thread-safe, because ``execution_recursion_decorator`` uses class variables to
count the function calls.

.. _settings-recursion:

Settings
~~~~~~~~~~

Recursion settings are important if you don't want extremely
recursive python code to go absolutely crazy.

The default values are based on experiments while completing the |jedi| library
itself (inception!). But I don't think there's any other Python library that
uses recursion in a similarly extreme way. Completion should also be fast and
therefore the quality might not always be maximal.

.. autodata:: recursion_limit
.. autodata:: total_function_execution_limit
.. autodata:: per_function_execution_limit
.. autodata:: per_function_recursion_limit
�)�contextmanager)�debug)�	NO_VALUES�����c��eZdZd�ZdS)�RecursionDetectorc��g|_dS�N)�pushed_nodes��selfs �:/usr/lib/python3/dist-packages/jedi/inference/recursion.py�__init__zRecursionDetector.__init__6s�������N)�__name__�
__module__�__qualname__r�rrrr5s#����������rrc	#�K�|jj}||vr+tjd|t	|dd����dV�dS	|�|��dV�|���dS#|���wxYw)z�
    A decorator to detect recursions in statements. In a recursion a statement
    at the same place, in the same module may not be executed two times.
    zcatched stmt recursion: %s @%s�	start_posNFT)�recursion_detectorrr�warning�getattr�append�pop)�inference_state�noders   r�execution_allowedr!:s�����#�5�B�L��|���
�
�6���d�K��6�6�	8�	8�	8�������	�����%�%�%��J�J�J����������L���������s�A.�.Bc����fd�}|S)Nc������fd�}|S)Nc����|jj}|�|��}	|r�}n	�|fi|��}|���n#|���wxYw|Sr
)r�execution_recursion_detector�push_execution�
pop_execution)r�kwargs�detector�
limit_reached�result�default�funcs     ��r�wrapperzAexecution_recursion_decorator.<locals>.decorator.<locals>.wrapperPs~����+�H�H�$�3�3�D�9�9�M�
)� �2�$�F�F�!�T�$�1�1�&�1�1�F��&�&�(�(�(�(���&�&�(�(�(�(�����Ms�A�Ar)r-r.r,s` �r�	decoratorz0execution_recursion_decorator.<locals>.decoratorOs)����
	�
	�
	�
	�
	�
	��rr)r,r/s` r�execution_recursion_decoratorr0Ns$���������rc�$�eZdZdZd�Zd�Zd�ZdS)�ExecutionRecursionDetectorz+
    Catches recursions of executions.
    c�L�||_d|_g|_i|_d|_dS)Nr)�_inference_state�_recursion_level�_parent_execution_funcs�_funcdef_execution_counts�_execution_count)rrs  rrz#ExecutionRecursionDetector.__init__cs0�� /��� !���')��$�)+��&� !����rc�X�|j���|xjdzc_dS)N�)r6rr5rs rr'z(ExecutionRecursionDetector.pop_executionks1���$�(�(�*�*�*�����"����rc���|j}|xjdz
c_|j�|��|���}|���rdS|jtkrtjdt��dS|j	tkrtjdt��dS|xj	dz
c_	|j�|d��tkr7|���dkrdStjdt|��dS|j|xxdz
cc<|j�|��t krtjd	t |��dSdS)
Nr:FzRecursion limit (%s) reachedTz%Function execution limit (%s) reachedr�typingz-Per function execution limit (%s) reached: %sz-Per function recursion limit (%s) reached: %s)�	tree_noder5r6r�get_root_context�is_builtins_module�recursion_limitrrr8�total_function_execution_limitr7�
setdefault�per_function_execution_limit�
py__name__�count�per_function_recursion_limit)r�	execution�funcdef�module_contexts    rr&z)ExecutionRecursionDetector.push_executionos����%��	
����"����$�+�+�G�4�4�4�"�3�3�5�5���,�,�.�.�	��5�� �?�2�2��M�8�/�J�J�J��4�� �$B�B�B��M�A�Ca�b�b�b��4�����"����)�4�4�W�a�@�@�D`�`�`��(�(�*�*�h�6�6��u��M�?�,��
�
�
�
�4��&�w�/�/�/�1�4�/�/�/��'�-�-�g�6�6�9U�U�U��M�?�,��
�
�
�
�4��urN)rrr�__doc__rr'r&rrrr2r2_sK��������"�"�"�#�#�#�*�*�*�*�*rr2N)rJ�
contextlibr�jedir�jedi.inference.base_valuerr@rArCrFrr!r0r2rrr�<module>rNs����8&�%�%�%�%�%�������/�/�/�/�/�/����"%��� !��� !���
��������
������&+4�����":�:�:�:�:�:�:�:�:�:r

Youez - 2016 - github.com/yon3zu
LinuXploit