ó
    Ñ]jP	  ã                  óR   • S r SSKJr  SSKrSSKrSSKJrJr  SS jrS	S jr	S
S jr
g)z9A fancy version of Python's builtin :func:`dir` function.é    )ÚannotationsN)ÚAnyÚCallablec                ó*   •  [        X5        g!    g= f)z^In recent versions of Python, hasattr() only catches AttributeError.
This catches all errors.
TF)Úgetattr)ÚobjÚattrs     ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/IPython/utils/dir2.pyÚsafe_hasattrr      s   € ðÜ�ÔØøðÙús   ‚ Žc                ó6  •  [        [        U 5      5      n[        U S5      (       a!  U[        [        U R                  5      5      -  nU Vs/ s H  n[        U[        5      (       d  M  UPM     nn[        U5      $ ! [         a    [        5       n N|f = fs  snf )aZ  dir2(obj) -> list of strings

Extended version of the Python builtin dir(), which does a few extra
checks.

This version is guaranteed to return only a list of true strings, whereas
dir() returns anything that objects inject into themselves, even if they
are later not really valid for attribute access (many extension libraries
have such bugs).
Ú	__class__)ÚsetÚdirÚ	Exceptionr   r   Ú
isinstanceÚstrÚsorted)r   ÚwordsÚws      r
   Údir2r      s€   € ðÜ”C˜“H“ˆô
 �C˜×%Ñ%Ø””S˜Ÿ™Ó'Ó(Ñ(ˆñ
 Ó4š�1¤¨A¬s×!3�Q™€EÐ4Ü�%‹=Ðøô ó ä“Šðüò 5s   ‚A< ÁBÁ)BÁ<BÂBc                ó  •  [        U SS5      nUb  g [        XS5      n[        R                  " U 5      (       a   [	        U[
        R                  5      (       d  g[        U5      (       a  U$ g! [         a     gf = f! [         a     gf = f)a-  Like getattr, but with a few extra sanity checks:

- If obj is a class, ignore everything except class methods
- Check if obj is a proxy that claims to have all attributes
- Catch attribute access failing with any exception
- Check that the attribute is a callable object

Returns the method or None.
Ú(_ipython_canary_method_should_not_exist_N)r   r   ÚinspectÚisclassr   ÚtypesÚ
MethodTypeÚcallable)r   ÚnameÚcanaryÚms       r
   Úget_real_methodr!   8   s�   € ðÜ˜ÐHÈ$ÓOˆð ÑàðÜ�C˜tÓ$ˆô ‡‚�s×Ñ¤J¨q´%×2BÑ2B×$CÑ$CØä�‡{�{Øˆàøô% ó Ùðûô ó Ùðús"   ‚A. ”A> Á.
A;Á:A;Á>
BÂ
B)r   Úobjectr	   r   ÚreturnÚbool)r   r"   r#   z	list[str])r   r"   r   r   r#   zCallable[..., Any] | None)Ú__doc__Ú
__future__r   r   r   Útypingr   r   r   r   r!   © ó    r
   Ú<module>r*      s%   ðá ?õ
 #ã Û ß  ôôõ>r)   