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/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

p�{cZ���UdZddlZddlmZddlmZmZmZddlm	Z	ddl
mZiaee
eeeeefffed<dd	ed
dfd�Zd�Zd
�Zd�ZdS)a7
This caching is very important for speed and memory optimizations. There's
nothing really spectacular, just some decorators. The following cache types are
available:

- ``time_cache`` can be used to cache something for just a limited time span,
  which can be useful if there's user interaction and the user cannot react
  faster than a certain time.

This module is one of the reasons why |jedi| is not thread-safe. As you can see
there are global variables, which are holding the cache information. Some of
these variables are being cleaned after every API usage.
�N��wraps)�Any�Dict�Tuple)�settings)�parser_cache�_time_cachesF�
delete_all�returnc�T�|rEt���D]}|����tj��dSt���D]F}t	|�����D]"\}\}}|t
j��kr||=�#�GdS)z� Jedi caches many things, that should be completed after each completion
    finishes.

    :param delete_all: Deletes also the cache that is normally not deleted,
        like parser cache, which is important for faster parsing.
    N)r
�values�clearr	�list�items�time)r�cache�tc�key�t�values      �,/usr/lib/python3/dist-packages/jedi/cache.py�clear_time_cachesrs���� �!�(�(�*�*�	�	�E��K�K�M�M�M�M���������%�%�'�'�	 �	 �B�#'����
�
�#3�#3�
 �
 ���Z�a���t�y�{�{�?�?��3���
 �	 �	 �c����fd�}|S)a\
    This decorator works as follows: Call it with a setting and after that
    use the function with a callable that returns the key.
    But: This function is only called if the key is not available. After a
    certain amount of time (`time_add_setting`) the cache is invalid.

    If the given key is None, the function will not be cached.
    c�2����i��t�<���fd�}|S)Nc�$���|i|��}t|��}	�|\}}|tj��kr|Sn#t$rYnwxYwt|��}tt�	��}|�tj��|z|f�|<|S�N)�nextr�KeyError�getattrr)
�args�kwargs�	generatorr�expiryr�time_add�dct�key_func�time_add_settings
       ���r�wrapperz4signature_time_cache.<locals>._temp.<locals>.wrapper<s���� ��$�1�&�1�1�I��y�/�/�C�
� #�C��
����D�I�K�K�'�'� �L�(���
�
�
���
������O�O�E��x�)9�:�:�H����9�;�;��1�5�8��C���Ls�#?�
A�A)r
)r(r*r'r)s` @�r�_tempz#signature_time_cache.<locals>._temp8s?�������),��%�&�	�	�	�	�	�	�	��r�)r)r+s` r�signature_time_cacher-/s#��������(�Lrc����fd�}|S)Nc�\����i�t������fd���}�fd�|_|S)Nc���|t|�����f}	�|\}}tj��|�zkr|Sn#t$rYnwxYw�|i|��}tj��|f�|<|Sr)�	frozensetrrr )r"r#r�created�resultr�func�secondss     ���rr*z.time_cache.<locals>.decorator.<locals>.wrapperSs������6�<�<�>�>�2�2�3�C�
�"'��*�����9�;�;��7�!2�2�2�!�M�3���
�
�
���
�����T�4�*�6�*�*�F�����f�,�E�#�J��Ms�&A�
A�Ac�,������Sr)r)rs�r�<lambda>z/time_cache.<locals>.decorator.<locals>.<lambda>`s���e�k�k�m�m�r)r�clear_cache)r4r*rr5s` @�r�	decoratorztime_cache.<locals>.decoratorPsU�������	�t���
	�
	�
	�
	�
	�
	�
��
	�4�3�3�3����rr,)r5r9s` r�
time_cacher:Os$��������&�rc�<��t����fd���}|S)zA normal memoize function.c���|j�di��}|��i��}|t|�����f}	||S#t$r�|g|�Ri|��}|||<|cYSwxYw)N�_memoize_method_dct)�__dict__�
setdefaultr1rr )�selfr"r#�
cache_dictr'rr3�methods       �rr*zmemoize_method.<locals>.wrapperhs�����]�-�-�.C�R�H�H�
��#�#�F�B�/�/���Y�v�|�|�~�~�.�.�/��	��s�8�O���	�	�	��V�D�2�4�2�2�2�6�2�2�F��C��H��M�M�M�	���s�A�A?�>A?r)rBr*s` r�memoize_methodrCfs3���
�6�]�]�	�	�	�	��]�	��Nr)F)�__doc__r�	functoolsr�typingrrr�jedir�parso.cacher	r
�str�float�__annotations__�boolrr-r:rCr,rr�<module>rMs����������������#�#�#�#�#�#�#�#�#�#�������$�$�$�$�$�$�8:��d�3��S�%��s�
�"3�3�4�4�5�:�:�:� � �$� �4� � � � �.���@���.
�
�
�
�
r

Youez - 2016 - github.com/yon3zu
LinuXploit