| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/IPython/utils/__pycache__/ |
Upload File : |
�
}�ex
� �X � d Z ddlmZ ddlmZ d� Zd� Zdd e� fded ed
ee fd�Z
y)
z�Decorators that don't go anywhere else.
This module contains misc. decorators that don't really go with another module
in :mod:`IPython.utils`. Before putting something here please see if it should
go into another topical module in :mod:`IPython.utils`.
� )�Sequence)�GENERATING_DOCUMENTATIONc �b � �� t � d� r� S � �fd��d�_ � j �_ �S )a% Wrap a function to detect and flag when it gets called.
This is a decorator which takes a function and wraps it in a function with
a 'called' attribute. wrapper.called is initialized to False.
The wrapper.called attribute is set to False right before each call to the
wrapped function, so if the call fails it remains False. After the call
completes, wrapper.called is set to True and the output is returned.
Testing for truth in wrapper.called allows you to determine if a call to
func() was attempted and succeeded.�calledc �4 �� d�_ �| i |��}d�_ |S )NFT)r )�args�kw�out�func�wrappers ���:/usr/lib/python3/dist-packages/IPython/utils/decorators.pyr zflag_calls.<locals>.wrapper- s% �� �����D��2�������
� F)�hasattrr �__doc__)r r s `@r
�
flag_callsr s2 �� � �t�X����� �G�N��l�l�G�O��Nr c � � | S )z�Mark a function or class as undocumented.
This is found by inspecting the AST, so for now it must be used directly
as @undoc, not as e.g. @decorators.undoc
� )r s r
�undocr 8 s � � �Kr TF�show_inheritance�show_inherited_members�exclude_inherited_fromc � � ��� �� �fd�}|S )zSet sphinx optionsc �>