Format: application/x-python-code
⬇ Download File (2.2 KB)
   1  o
   2  
   3  ��hx
   4  �@sTdZddlmZddlmZdd�Zdd�Zdd	e�fd
   5  ededee	fd
   6  d�Z
   7  dS)z�Decorators that don't go anywhere else.
   8  
   9  This module contains misc. decorators that don't really go with another module
  10  in :mod:`IPython.utils`. Before putting something here please see if it should
  11  go into another topical module in :mod:`IPython.utils`.
  12  �)�Sequence)�GENERATING_DOCUMENTATIONcs.t�d�r�S��fdd��d�_�j�_�S)a%Wrap a function to detect and flag when it gets called.
  13  
  14      This is a decorator which takes a function and wraps it in a function with
  15      a 'called' attribute. wrapper.called is initialized to False.
  16  
  17      The wrapper.called attribute is set to False right before each call to the
  18      wrapped function, so if the call fails it remains False.  After the call
  19      completes, wrapper.called is set to True and the output is returned.
  20  
  21      Testing for truth in wrapper.called allows you to determine if a call to
  22      func() was attempted and succeeded.�calledcsd�_�|i|��}d�_|S)NFT)r)�args�kw�out��func�wrapper��Nc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/utils/decorators.pyr
  23  -szflag_calls.<locals>.wrapperF)�hasattrr�__doc__�r	rrr�
  24  flag_callss
  25  rcCs|S)z�Mark a function or class as undocumented.
  26  
  27      This is found by inspecting the AST, so for now it must be used directly
  28      as @undoc, not as e.g. @decorators.undoc
  29      rrrrr�undoc8srTF�show_inheritance�show_inherited_members�exclude_inherited_fromcs���fdd�}|S)zSet sphinx optionscsts|St���d�|_|S)N)rrr)r�dictZ_sphinx_optionsr�rrrrrr
  30  Hs�zsphinx_options.<locals>.wrapperr)rrrr
  31  rrr�sphinx_optionsAsrN)r�typingrZIPython.utils.docsrrr�tuple�bool�strrrrrr�<module>s
  32  ����