+
    e                        ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
HtHtHt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  ! R R]4      t ! R R4      t ! R R]4      t ! R R]]4      tR# )    N)Path)Optional)inference_state_method_cache)AbstractNameDefinition
ModuleName)GlobalNameFilterParserTreeFilter
DictFilterMergedFilter)compiled)	TreeValue)SubModuleName)values_from_qualified_names)create_simple_object)ValueSetModuleContextc                   8   a  ] tR t^t o RtRtRR ltR tRtV t	R# )_ModuleAttributeNamez9
For module attributes like __file__, __str__ and so on.
instanceNc                *    Wn         W n        W0n        R # N)parent_contextstring_name_string_value)selfparent_moduler   string_values   &&&&=/usr/lib/python3/dist-packages/jedi/inference/value/module.py__init___ModuleAttributeName.__init__   s    +&)    c                    V P                   e7   V P                   p\        \        V P                  P                  V4      .4      # \
        P                  ! V P                  P                  4      # r   )r   r   r   r   inference_stater   get_string_value_set)r   ss   & r   infer_ModuleAttributeName.infer   s`    )""A$T%8%8%H%H!L   ,,T-@-@-P-PQQr"   )r   r   r   r   )
__name__
__module____qualname____firstlineno____doc__api_typer    r'   __static_attributes____classdictcell____classdict__s   @r   r   r      s"      H*
R Rr"   r   c                   :   a  ] tR t^%t o ]! 4       R 4       tRtV tR# )SubModuleDictMixinc                    / pV P                  4       '       dY   V P                  P                  P                  V P	                  4       4      pV F  p\        V P                  4       V4      W&   K!  	  V# )zN
Lists modules in the directory of this module (if this module is a
package).
)
is_packager$   compiled_subprocessiter_module_names
py__path__r   
as_context)r   namesmodsnames   &   r   sub_modules_dict#SubModuleDictMixin.sub_modules_dict&   sd     ??'';;MM!D +DOO,=tD  r"    N)r)   r*   r+   r,   r   r>   r/   r0   r1   s   @r   r4   r4   %   s     !# $r"   r4   c                      a  ] tR t^:t o ]tRR ltR tR tR t	]
]! 4       R 4       4       t]! 4       R 4       tR t]! . 4      R	 4       tR
 tRtV tR# )ModuleMixinNc              #  *  "   \        \        V P                  4       VR 7      \        V P                  4       4      4      x  \	        V P                  4       4      x  \	        V P                  4       4      x  V P                  4        Rj  xL
  R#  L5i))r   origin_scopeN)r   r	   r:   r   r
   r>   _module_attributes_dictiter_star_filters)r   rD   s   &&r   get_filtersModuleMixin.get_filters=   st     #0) T__./
 	
 ..01155788))+++s   BB
BBc                8    \        V P                  R R4      w  pV# )types
ModuleType)r   r$   )r   cs   & r   py__class__ModuleMixin.py__class__I   s    ()=)=wUr"   c                    R # )Tr@   r   s   &r   	is_moduleModuleMixin.is_moduleM   s    r"   c                    R # )Fr@   rP   s   &r   is_stubModuleMixin.is_stubP   s    r"   c                F    V P                  W P                  R,          4      # )   )_module_name_classstring_namesrP   s   &r   r=   ModuleMixin.nameS   s      &&t->->r-BCCr"   c                   a  . ROp\        V 3R lV 4       4      pS P                  4       pVe   \        S R\        V4      4      VR&   V# )__package__c              3   >   <"   T F  q\        SV4      3x  K  	  R # 5ir   )r   ).0nr   s   & r   	<genexpr>6ModuleMixin._module_attributes_dict.<locals>.<genexpr>\   s     Eu!+D!45us   __file__)r]   r-   r)   )dict
py__file__r   str)r   r;   dctpaths   f   r   rE   #ModuleMixin._module_attributes_dictX   sE    6EuEE 24SYOC
O
r"   c              #     "   V P                  4        F'  p\        VP                  4       R 4      pVf   Q hVx  K)  	  R # 5ir   )star_importsnextrG   )r   star_modulefs   &  r   rF   ModuleMixin.iter_star_filtersb   s<     ,,.K[,,.5A= =G /s   >A c                   ^ RI Hp . pV P                  4       pV P                  P	                  4        F  pVP                  4       '       g   K  V! V P                  VP                  4       R,          VVP                  R7      P                  4       pV F1  p\        V\        4      '       g   K  W&P                  4       ,          pK3  	  W%,          pK  	  V# )r   )Importer)import_pathmodule_contextlevelrX   )jedi.inference.importsrq   r:   	tree_nodeiter_importsis_star_importr$   	get_pathsrt   follow
isinstanceModuleValuerk   )r   rq   modulesrs   inewmodules   &      r   rk   ModuleMixin.star_importsk   s    3*,,.A!!(( !b 1#1''	
 &(  "F!&+66#6#6#88 "  / r"   c                    R# )z
A module doesn't have a qualified name, but it's important to note that
it's reachable and not `None`. With this information we can add
qualified names on top for all value children.
r@   r@   rP   s   &r   get_qualified_namesModuleMixin.get_qualified_names   s	     	r"   r@   r   )r)   r*   r+   r,   r   rY   rG   rM   rQ   rT   propertyr   r=   rE   rF   rk   r   r/   r0   r1   s   @r   rB   rB   :   s     #
, !#D $ D "# $ ""% &( r"   rB   c                   |   a a ] tR t^t oRtRV 3R lltV 3R ltR tV3R lR ltR t	R t
R	 tR
 tR tRtVtV ;t# )r|   r   c                   < \         SV `  VR VR7       W@n        Vf	   R V n        MVP                  V n        WPn        W0n        W`n        R # )N)r   rv   )superr    file_io_pathrh   rZ   
code_lines_is_package)r   r$   module_noder   r   rZ   r6   	__class__s   &&&&&&&r   r    ModuleValue.__init__   sM    ! 	 	

 ?)-DJ DJ($%r"   c                v   < V P                   e   V P                   P                  R8X  d   R# \        SV `  4       # )Nz.pyiT)r   suffixr   rT   )r   r   s   &r   rT   ModuleValue.is_stub   s0    ::!djj&7&76&A w  r"   c                X    V P                   f   R # RP                  V P                   4      # )N.)rZ   joinrP   s   &r   
py__name__ModuleValue.py__name__   s&    $xx))**r"   c                0   < V ^8  d   QhRS[ S[,          /# )   return)r   r   )formatr2   s   "r   __annotate__ModuleValue.__annotate__   s     % %HTN %r"   c                V    V P                   f   R# V P                   P                  4       # )z/
In contrast to Python's __file__ can be None.
N)r   absoluterP   s   &r   re   ModuleValue.py__file__   s$     ::zz""$$r"   c                    V P                   # r   )r   rP   s   &r   r6   ModuleValue.is_package   s    r"   c                |    V P                   f   . # V P                  '       d   V P                   # V P                   R R # )NrX   )rZ   r   rP   s   &r   py__package__ModuleValue.py__package__   s>    $I$$$  "%%r"   c                h   V P                   '       g   R# RP                  V P                  R,          4      pRpV^ ,          V9   g   V^,          V9   d   \        4       pV P                  P                  4        Fn  p\        P                  P                  W@P                  P                  4      p\        P                  P                  V4      '       g   K]  VP                  V4       Kp  	  V'       d   \        V4      # V P                  4       pVf   Q h\        P                  P                  V4      .# )z
In case of a package, this returns Python's __path__ attribute, which
is a list of paths (strings).
Returns None if the module is not a package.
N :N2   N)zdeclare_namespace(__name__)zextend_path(__path__)r   r   r   setr$   get_sys_pathosrh   r=   r   isdiraddlistre   dirname)r   first_few_linesoptionspathsr&   otherfiles   &      r   r9   ModuleValue.py__path__   s      ''$//#"67 J1:(GAJ/,I EE))668Q		(=(=>77==''IIe$ 9 E{"  %&&r"   c                    \        V 4      # r   r   rP   s   &r   _as_contextModuleValue._as_context   s    T""r"   c                    R V P                   P                  : RV P                  4       : RV P                  P                  ^ ,          : RV P                  P
                  ^ ,          : RV P                  4       : R2# )<z: @-z	 is_stub=>)r   r)   r   rv   	start_posend_posrT   rP   s   &r   __repr__ModuleValue.__repr__   sT    NN##T__%6NN$$Q'')?)?)B)BLLN
 	
r"   )r   r   r   r   rZ   )NNF)r)   r*   r+   r,   r.   r    rT   r   re   r6   r   r9   r   r   r/   r0   __classcell__)r   r2   s   @@r   r|   r|      sB     H& !+
% % &'B#
 
r"   r|   )r   pathlibr   typingr   jedi.inference.cacher   jedi.inference.namesr   r   jedi.inference.filtersr   r	   r
   r   jedi.inferencer   jedi.inference.base_valuer   r   jedi.inference.helpersr   jedi.inference.compiledr   r   jedi.inference.contextr   r   r4   rB   r|   r@   r"   r   <module>r      sh    	   = C _ _ # / . > 8 . 0R1 R( *L$ L^]
+y ]
r"   