+
    en,                        R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ R	IHtHtHt ^ R
IHt ^ RIHtHt ^ RIHtHt ^ RIHt ^ RIHtH t H!t! ]"! 4       t# ! R R]4      t$ ! R R]]!4      t% ! R R] ]%4      t& ! R R]4      t' ! R R]PP                  4      t)]! 4       R 4       t*R t+R t,]! 4       R 4       t-R# )z 
Used only for REPL Completion.
N)Path)get_cached_code_lines)settings)memoize_method)compiled)FileIO)NameWrapper)ValueSetValueWrapper	NO_VALUES)ModuleValue)inference_state_function_cacheinference_state_method_cache)ALLOWED_GETITEM_TYPESget_api_type)to_stub)CompiledContextCompiledModuleContextTreeContextMixinc                      a a ] tR t^t oRtV 3R ltR tR t]! ]	R7      R 4       t
]3R lt]R 4       tR	 tR
 tR tR tR tRtVtV ;t# )MixedObjecta  
A ``MixedObject`` is used in two ways:

1. It uses the default logic of ``parser.python.tree`` objects,
2. except for getattr calls and signatures. The names dicts are generated
   in a fashion like ``CompiledValue``.

This combined logic makes it possible to provide more powerful REPL
completion. It allows side effects that are not noticable with the default
parser structure to still be completable.

The biggest difference from CompiledValue to MixedObject is that we are
generally dealing with Python code and not with C code. This will generate
fewer special cases, because we in Python you don't have the same freedoms
to modify the runtime.
c                T   < \         SV `  V4       Wn        VP                  V n        R # N)super__init__compiled_valueaccess_handle)selfr   
tree_value	__class__s   &&&?/usr/lib/python3/dist-packages/jedi/inference/compiled/mixed.pyr   MixedObject.__init__,   s$    $,+99    c              /  h   "   \        V P                  V P                  V P                  4      x  R # 5ir   )MixedObjectFilterinference_stater   _wrapped_value)r   argskwargss   &*,r    get_filtersMixedObject.get_filters1   s-       $"5"5t7J7JL 	Ls   02c                6    V P                   P                  4       # r   )r   get_signaturesr   s   &r    r,   MixedObject.get_signatures5   s     ""1133r"   )defaultc                v    \        V P                  4      pV'       g   V P                  pVP                  V4      # r   )r   r&   
py__call__)r   	argumentsvaluess   && r    r1   MixedObject.py__call__:   s3     ,,-((F  ++r"   c                    V\         J d   V P                  P                  4       # V P                  P                  V4      # r   )	_sentinelr   get_safe_value)r   r/   s   &&r    r7   MixedObject.get_safe_valueB   s6    i&&5577&&55g>>r"   c                .    V P                   P                  # r   )r   
array_typer-   s   &r    r:   MixedObject.array_typeH   s    ""---r"   c                6    V P                   P                  4       # r   )r   get_key_valuesr-   s   &r    r=   MixedObject.get_key_valuesL   s    ""1133r"   c                    V P                   P                  P                  P                  p\	        V4      \
        9   d   V P                   P                  V4      # V P                  P                  V4      # r   )r   r   access_objtyper   py__simple_getitem__r&   )r   indexpython_objects   && r    rC    MixedObject.py__simple_getitem__O   s[    ++99@@EE"77&&;;EBB""77>>r"   c                6    V P                   P                  4       # r   )r   negater-   s   &r    rH   MixedObject.negateU   s    ""))++r"   c                J    V P                   f   \        V 4      # \        V 4      # r   )parent_contextMixedModuleContextMixedContextr-   s   &r    _as_contextMixedObject._as_contextX   s$    &%d++D!!r"   c                    R \        V 4      P                  : RV P                  P                  4       : RV P                  : R2# )<z: z; >)rB   __name__r   get_reprr&   r-   s   &r    __repr__MixedObject.__repr__]   s4    J'')
 	
r"   )r   r   )rS   
__module____qualname____firstlineno____doc__r   r)   r,   r   r   r1   r6   r7   propertyr:   r=   rC   rH   rN   rU   __static_attributes____classdictcell____classcell__r   __classdict__s   @@r    r   r      so      :
L4
 ")4, 5, &/ ? . .4?,"

 
r"   r   c                   0   a  ] tR t^et o ]R 4       tRtV tR# )rM   c                .    V P                   P                  # r   )_valuer   r-   s   &r    r   MixedContext.compiled_valuef   s    {{)))r"    N)rS   rW   rX   rY   r[   r   r\   r]   )r`   s   @r    rM   rM   e   s     * *r"   rM   c                       ] tR t^ktRtR# )rL   re   N)rS   rW   rX   rY   r\   re   r"   r    rL   rL   k   s    r"   rL   c                   V   a a ] tR t^ot oRtV 3R lt]R 4       t]R 4       t	Rt
VtV ;t# )	MixedNamez:
The ``CompiledName._compiled_value`` is our MixedObject.
c                2   < \         SV `  V4       W n        R # r   )r   r   _parent_tree_value)r   wrapped_nameparent_tree_valuer   s   &&&r    r   MixedName.__init__s   s    &"3r"   c                    \        V P                  4       4      pV'       g   R# V^ ,          P                  P                  # )    )ro   ro   )listinfername	start_pos)r   r3   s   & r    rs   MixedName.start_posw   s.    djjl#Kay~~'''r"   c           	        V P                   P                  4       pV P                  pVP                  4       '       g   VP	                  4       '       dV   VP                  V P                  4      pVP                  4       '       d%   \        V Uu0 uF  p\        W4      kK  	  up4      # VP                  4       p\        V P                  W4      # u upi r   )_wrapped_nameinfer_compiled_valuerj   is_instanceis_classpy__getattribute__string_nameis_functionr	   r   get_root_context_create_inference_state)r   r   r   tree_valuesvmodule_contexts   &     r    rq   MixedName.infer   s    ++@@B,,
!!##z':':'<'<$778H8HIK))++ UA^!? UVV#446t,,nMM !Vs   C)rj   )rS   rW   rX   rY   rZ   r   r[   rs   r   rq   r\   r]   r^   r_   s   @@r    rh   rh   o   s?     4 ( ( 	N 	N 	Nr"   rh   c                   >   a a ] tR t^t oV 3R ltV 3R ltRtVtV ;t# )r$   c                2   < \         SV `  W4       W0n        R # r   )r   r   _tree_value)r   r%   r   r   r   s   &&&&r    r   MixedObjectFilter.__init__   s    9%r"   c                L   < \        \        SV `  ! V/ VB V P                  4      # r   )rh   r   _create_namer   )r   r'   r(   r   s   &*,r    r   MixedObjectFilter._create_name   s+    G $1&1
 	
r"   )r   )	rS   rW   rX   rY   r   r   r\   r]   r^   r_   s   @@r    r$   r$      s     &
 
r"   r$   c                     V P                  VR \        P                  \        P                  R7      P	                  4       # )T)pathcache
diff_cache
cache_path)parser   fast_parsercache_directoryget_root_node)r%   r   s   &&r    _load_moduler      s;      ''++	 ! 
 mor"   c                "    \         P                  ! V 4      p \         P                  ! V 4      '       g   \         P                  ! V 4      '       g   \         P
                  ! V 4      '       gq   \         P                  ! V 4      '       gU   \         P                  ! V 4      '       g9   \         P                  ! V 4      '       g   \         P                  ! V 4      '       d   V #  V P                  #   \         d     Li ; i  \         d    \        hi ; i)z9Check if inspect.getfile has a chance to find the source.)inspectunwrap
ValueErrorismoduleisclassismethod
isfunctionistracebackisframeiscoder   AttributeError	TypeError)rE   s   &r    _get_object_to_checkr      s    }5
 	''}--..!!-00""=11}--~~m,,&&&    s   C+ C< +C98C9<Dc                 >   Tp \        V4      p\        P                  ! V4      pTf   R M
\        T4      p Te   TP                  4       '       g   R #  \        T4      p\        Y4      p\        P                  ! T4      '       d   \        T P                  T4      pYUYF3#  TP                  pTR8X  d   R # TP                  4       P                  T. 4      pT U	u. uF?  p	T	P                   P"                  R9   g   K   T	P                   P$                  T	8X  g   K=  T	NKA  	  pp	T'       g   R #  TP&                  p
T
P(                  pT Uu. uF  qP*                  ^ ,          T8X  g   K  TNK   	  ppT'       d   Tp\        T P                  T4      pTR,          P                   pTP"                  R8X  d   \-        T4      R8X  d   R # Y^YF3#   \        \        3 d     R # i ; i  \         d     R # i ; i  \         d     R # i ; iu up	i u upi   \         d     Li ; i)Nz<lambda>funcdefinstance)r   classdef)r   r   getsourcefileOSErrorr   r   existsr   r   r   r   grammarrS   r   get_used_namesgetparentrB   rr   __code__co_firstlinenors   r   )r%   rE   original_objectr   file_iomodule_node
code_linesname_strnamesncodeline_nrrr   
line_names	tree_nodes   &&             r    _find_syntax_node_namer      s   #O,];$$]3 <4T$ZD	<t{{}}  - TlG5K&& +?+B+BDI
<< ))
 : &&(,,Xr:E
 a88==33 	
898J 	
5 
  %%
 %% (-Mutq0AW0Lddu
M E&'>'>EJ b	  I~~"|O'D
'R 766U Y   
 &  " N  sd   !G G  !G2 H<HH,H H	&H	GG G/.G/2H HHHc           	      <  a SP                   P                  P                  p\        W4      pVfM   \	        V4      \
        \        \        39   d   \        S04      # \        S4      pV'       g   \        S04      # EMVw  rgrVe   VP                  V8w  d   SP                  4       P                  4       p
V
P                  4       p\        VP                  R4      4      p\        WVVV	V
P!                  4       R7      pVe'   V P"                  P%                  V\        V.4      4       VP'                  4       p\        VP)                  V4      04      pVP                  R8X  d'   SP+                  4       '       g   VP-                  4       p\        V3R lV 4       4      # )N.)r   string_namesr   
is_packager   c              3   >   <"   T F  p\        SVR 7      x  K  	  R# 5i))r   N)r   ).0r   r   s   & r    	<genexpr>_create.<locals>.<genexpr>2  s"      %J 	Nz::%s   )r   r@   rA   r   rB   dictrp   tupler	   r   r   r}   	get_value
py__name__splitr   r   module_cacheadd
as_contextcreate_valuery   execute_with_values)r%   r   r   rE   resultr   r   r   r   r   root_compiled_valuerr   r   module_values   &f&           r    r~   r~     st    #0077<<M#OCF~4u"55^,--n-^,--  7=3!^%=%=%L"0"A"A"C"M"M"O&113D C1L&)%.99;L ,,00x?WX)446N ; ;I FGH>>Z'!**,,)==? %  r"   ).rZ   r   pathlibr   jedi.parser_utilsr   jedir   
jedi.cacher   jedi.inferencer   jedi.file_ior   jedi.inference.namesr   jedi.inference.base_valuer	   r
   r   jedi.inference.valuer   jedi.inference.cacher   r   jedi.inference.compiled.accessr   r   !jedi.inference.gradual.conversionr   jedi.inference.contextr   r   r   objectr6   r   rM   rL   rh   CompiledValueFilterr$   r   r   r   r~   re   r"   r    <module>r      s      3  % #  , G G ,! N 5  H	G
, G
T*?$4 *	. 	N N:	
44 	
  ! ".O7d  !) ")r"   