Ë
    7;h¸  ã                   ó*   — d Z ddlZddlZd„ Zd„ Zd„ Zy)z:A fancy version of Python's builtin :func:`dir` function.
é    Nc                 ó,   — 	 t        | |«       y#  Y yxY w)zfIn recent versions of Python, hasattr() only catches AttributeError.
    This catches all errors.
    TF)Úgetattr)ÚobjÚattrs     úc/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/IPython/utils/dir2.pyÚsafe_hasattrr      s   € ðÜ��TÔØøðÙús   ‚ �c                 ó  — 	 t        t        | «      «      }t        | d«      r!|t        t        | j                  «      «      z  }|D �cg c]  }t        |t        «      sŒ|‘Œ }}t        |«      S # t        $ r t        «       }Y Œmw xY wc c}w )av  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                 óø   — 	 t        | dd«      }|�y	 t        | |d«      }t        j                  | «      rt	        |t
        j                  «      syt        |«      r|S y# t        $ r Y yw xY w# t        $ r Y yw xY w)aE  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   6   sŠ   € ðÜ˜ÐHÈ$ÓOˆð ÐàðÜ�C˜˜tÓ$ˆô ‡��sÔ¤J¨q´%×2BÑ2BÔ$CØä�„{Øˆàøô% ò Ùðûô ò Ùðús"   ‚A “A- Á	A*Á)A*Á-	A9Á8A9)Ú__doc__r   r   r   r   r   © ó    r   Ú<module>r"      s!   ðñó Û òòó>r!   