
    ^h                     `    S r SSKrSSKJr  \" 5       rS rS rS rS r	S r
S	 rS
 r\4S jrg)z
A static version of getattr.
This is a backport of the Python 3 code with a little bit of additional
information returned to enable Jedi to make decisions.
    N)debugc                     0 n [         R                  U S5      n[        R	                  X![
        5      $ ! [         a     N&f = fN__dict__)object__getattribute__AttributeErrordictget	_sentinel)objattrinstance_dicts      `/home/james-whalen/.local/lib/python3.13/site-packages/jedi/inference/compiled/getattr_static.py_check_instancer      sE    M//Z@ 88M33  s   4 
A Ac                     [        U 5       H0  n[        [        U5      5      [        L d  M    UR                  U   s  $    [        $ ! [
         a     MG  f = fN)_static_getmro_shadowed_dicttyper   r   KeyError)klassr   entrys      r   _check_classr      sR    &$u+&)3~~d++ '   s   A
AAc                 <     [        U 5        g! [         a     gf = f)NFT)r   	TypeErrorr   s    r   _is_typer   !   s(    s   s    
c                 "   [         R                  S   n[        U 5       HW  n UR                  U5      S   n[        U5      [        R
                  L a  UR                  S:X  a  UR                  UL d  Us  $ MY     [        $ ! [         a     Mn  f = fr   )
r   r   r   __get__typesGetSetDescriptorType__name____objclass__r   r   )r   	dict_attrr   
class_dicts       r   r   r   )   s    j)I&	""**51*=J $(B(BB"++z9"//58!! 9 '   		s   B  
BBc                     [         R                  S   R                  U 5      n[        U[        [
        45      (       d   [        R                  " SU < SU< S35        gU$ )N__mro__zmro of z
 returned z, should be a tuple )r   r   r    
isinstancetuplelistr   warning)r   mros     r   r   r   8   sG    
--	
"
*
*5
1CcE4=)) 	E3OPJ    c                 8    [        [        U 5      U5      [        L$ r   )r   r   r   )r   names     r   _safe_hasattrr2   C   s    S	4(	99r/   c                 @    [        U S5      =(       d    [        U S5      $ )N__set__
__delete__)r2   r   s    r   _safe_is_data_descriptorr6   G   s    i(LM#|,LLr/   c                 z   [         n[        U 5      (       dG  [        U 5      n[        U5      nU[         L d  [        U5      [        R
                  L a  [        X5      nOU n[        XA5      nU[         La.  U[         La%  [        US5      (       a  [        U5      (       a  US4$ U[         La  US4$ U[         La  U[        US5      4$ XL aJ  [        [        U5      5       H2  n[        [        U5      5      [         L d  M    UR                  U   S4s  $    U[         La  US4$ [        U5      e! [         a     M[  f = f)aH  Retrieve attributes without triggering dynamic lookup via the
descriptor protocol,  __getattr__ or __getattribute__.

Note: this function may not be able to retrieve all attributes
that getattr can fetch (like dynamically created attributes)
and may find attributes that getattr can't (like descriptors
that raise AttributeError). It can also return descriptor objects
instead of instance members in some cases. See the
documentation for details.

Returns a tuple `(attr, is_get_descriptor)`. is_get_descripter means that
the attribute is a descriptor that has a `__get__` attribute.
r    TF)r   r   r   r   r!   MemberDescriptorTyper   r   r2   r6   r   r   r   r	   )r   r   defaultinstance_resultr   r%   klass_resultr   s           r   getattr_staticr<   K   s,     OC==S	"5)	"d9o9S9S&S-c8O,Li'L	,Iy11,\::%%i'%%9$]<CCC
|#DK0Ed5k*i7 >>$/66 1 i~

	   s   ?D,,
D:9D:)__doc__r!   jedir   r   r   r   r   r   r   r   r2   r6   r<   r)   r/   r   <module>r?      sG     H	4:M '0 .r/   