+
    e%                         ^ RI t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RIHtHt ^ R	IHt . ROtR
 tR tR tR tR tR tR tR R lt]! 4       RR l4       t ! R R]4      tR# )    N)List)Path)search_ancestor)inference_state_method_cache)goto_importload_module_from_path)ParserTreeFilter)	NO_VALUESValueSet)infer_call_of_leafc                    a  V 3R  lpV# )c                    < V P                  4       R 8X  d&   V P                  P                  4       R8X  d   \        # S! W4      # )fixturez_pytest.fixtures)
py__name__parent_contextr
   )value	argumentscallbacks   &&5/usr/lib/python3/dist-packages/jedi/plugins/pytest.pywrapperexecute.<locals>.wrapper   s?     *((3359KK))     )r   r   s   f r   executer      s    * Nr   c                    a a R  oV V3R lpV# )c                    V P                   P                  ej   V P                  4       p\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        P
                  ! R V 4       4      # V# V P                  4       pVP                  4       '       d   VP                  4       # VP                  4       # )Nc              3   `   "   T F$  pVP                   P                  R R7      R8H  x  K&  	  R# 5i)Tinclude_module_namesN)typing	Generator)nameget_qualified_names.0vs   & r   	<genexpr>=infer_anonymous_param.<locals>.get_returns.<locals>.<genexpr>%   s1      $"q 66--4-H-."   ,.TFc              3   `   "   T F$  pVP                  R 4      P                  4       x  K&  	  R# 5i)__next__N)py__getattribute__execute_annotationr$   s   & r   r'   r(   (   s.      *# ((4GGII#r)   )
	tree_node
annotationexecute_with_valuesanyr   	from_sets
as_contextis_generatormerge_yield_valuesget_return_values)r   resultfunction_contexts   &  r   get_returns*infer_anonymous_param.<locals>.get_returns"   s    ??%%1..0Fs $"$sss $"$ $ $  )) *#*   M
 !++-((**#6688#5577r   c                   < V P                   '       d	   S! V 4      # \        V 4      w  rV'       dQ   V P                  4       p\        VV P                  VR 7      pV'       d!   \
        P                  ! V3R lV 4       4      # S! V 4      # )skip_own_modulec              3   b   <"   T F$  pVP                  4        F  pS! V4      x  K  	  K&  	  R # 5iN)infer)r%   r   r   r9   s   &  r   r'   9infer_anonymous_param.<locals>.wrapper.<locals>.<genexpr>G   s3      *#+!(  &&!0 '#+s   ,/)annotation_node _is_a_pytest_param_and_inheritedget_root_context_goto_pytest_fixturestring_namer   r2   )
param_nameis_pytest_paramparam_name_is_function_namemodulefixturesfuncr9   s   &    r   r   &infer_anonymous_param.<locals>.wrapper7   s    %%%
##,Z8 	5002F+&& !<H )) *#+*  
 Jr   r   )rL   r   r9   s   f @r   infer_anonymous_paramrN   !   s    8* , Nr   c                    a  V 3R  lpV# )c                    < \        V 4      w  rV'       d1   \        V P                  4       V P                  VR 7      pV'       d   V# S! V 4      # )r<   )rC   rE   rD   rF   )rG   rH   rI   namesrL   s   &   r   r   %goto_anonymous_param.<locals>.wrapperQ   sL    ,Z8 	5(++-&& ;E
 Jr   r   rL   r   s   f r   goto_anonymous_paramrT   P   s      Nr   c                    a  V 3R  lpV# )c                    < V P                  4       p\        W4      '       d?   . p\        V4       F#  pV\        V4      P	                  4       ,          pK%  	  V'       d   V# S! WV4      # r?   )rD   _is_pytest_func_iter_pytest_modulesFixtureFiltervalues)context	func_namedecorator_nodesmodule_contextrQ   rL   s   &&&  r   r   %complete_param_names.<locals>.wrappera   s^     113966E"6~"F~6==?? #GG88r   r   rS   s   f r   complete_param_namesr`   `   s    9 Nr   c                 x    \        WR 7       F)  p \        V 4      P                  V4      pV'       g   K'  Vu # 	  R# )r<   N)rX   rY   get)r^   r"   r=   rQ   s   &&& r   rE   rE   m   s1    .~_n-11$75L `r   c                    \        V P                  R4      pVf   R# VP                  4       p\        VP                  P
                  V4      VP                  P
                  V P                  8H  3# )z
Pytest params are either in a `test_*` function or have a pytest fixture
with the decorator @pytest.fixture.

This is a heuristic and will work in most cases.
funcdef)FF)r   	tree_nameget_decoratorsrW   r"   r   rF   )rG   rd   
decoratorss   &  r   rC   rC   t   se     j22I>G'')J7<<--z:j4445 5r   c                     V P                  R 4      ;'       g5    \        ;QJ d    R V 4       F  '       g   K   R# 	  R# ! R V 4       4      # )testc              3   H   "   T F  pR VP                  4       9   x  K  	  R# 5i)r   N)get_code)r%   ns   & r   r'   "_is_pytest_func.<locals>.<genexpr>   s     B/QyAJJL(/s    "TF)
startswithr1   )r\   r]   s   &&r   rW   rW      sP    ' C C3B/B33CCB/BBCr   c                P    V ^8  d   QhR\         \         \        ,          ,          /# )   return)r   str)formats   "r   __annotate__rt      s     Y YT$s)_ Yr   c                    \         P                  R8  d   ^ RIHp  \         P                  R8  d   V ! RR7      pMV ! 4       P	                  RR	4      p\         P                  R
8  d+   V Uu. uF  q"P
                  P                  R4      NK  	  up# V Uu. uF(  pVP                  P                  VP                  4      NK*  	  ppV Uu. uF,  qD'       g   K  VP                  R4      P                  R4      NK.  	  up# ^ RIHp V! RR7       Uu. uF  q"P                  P                  R4      NK  	  up# u upi u upi u upi u upi )z
Finds pytest plugin modules hooked by setuptools entry points

See https://docs.pytest.org/en/stable/how-to/writing_plugins.html#setuptools-entry-points
)entry_pointspytest11)group.rJ   )iter_entry_points)      )r{   
   r   )r{   	   )sysversion_infoimportlib.metadatarv   rb   rJ   splitpatternmatchr   rx   pkg_resourcesrz   module_name)rv   pytest_entry_pointsepmatchesxrz   s         r   _find_pytest_plugin_modulesr      s    6!3w&".Z"@".."4"4Z"Dv%3FG3FRIIOOC(3FGG .-B 

  *-   ;BG'QQ0AGGH%++C0'GG 	44EJ4WX4Wb$$S)4WXX H H Ys   +#D5.D:		D?$D?#Ec              #   ,  a"   V'       g   V x  V P                  4       P                  pVEe   VP                  4       oV P                  P	                  4       pR p\
        ;QJ d    V3R lV 4       F  '       g   K   RM	  RM! V3R lV 4       4      '       d   SP                  R4      p\        VP                  4      V P                  4       8w  d*    \        V P                  V4      pVP                  4       x  SP                  4       oVe   SP                  VP                  8X  d   MSpK  \        \        4       ,            F7  pV P                  P                  V4       F  pVP                  4       x  K  	  K9  	  R #   \         d     Li ; i5i)Nc              3   Z   <"   T F   pSP                   P                  V4      x  K"  	  R # 5ir?   )pathrn   )r%   pfolders   & r   r'   '_iter_pytest_modules.<locals>.<genexpr>   s#     >X&++((++Xs   (+TFzconftest.py)	get_valuefile_ioget_parent_folderinference_stateget_sys_pathr1   get_file_ior   r   
py__file__r   r3   FileNotFoundError_PYTEST_FIXTURE_MODULESr   import_module)	r^   r=   r   sys_pathlast_foldermrQ   module_valuer   s	   &&      @r   rX   rX      sF    &&(00G**,!11>>@ c>X>ccc>X>>>((7GGLL!^%>%>%@@-n.L.LgVA,,.( --/F &6;;+:J:J+J K(+F+HHH*::HHOL))++ P I ) s=   A"F&F=F9F(F =BFFFFFc                   8   a a ] tR t^t oV 3R ltR tRtVtV ;t# )rY   c              #    <a "   \         SS `  V4       F  pVP                  P                  R 8X  d_   \	        S P
                  V4      p\        ;QJ d    V 3R lV 4       F  '       g   K   RM	  RM! V 3R lV 4       4      '       d   Vx  Kz  K|  S P                  S P
                  V4      '       g   K  Vx  K  	  R# 5i)import_fromc              3      <"   T F?  pVP                   '       g   K  SP                  VP                  VP                   4      x  KA  	  R # 5ir?   )re   _is_fixturer   )r%   inameselfs   & r   r'   (FixtureFilter._filter.<locals>.<genexpr>   s<      !/ LD$$U%9%95??KK!/s
   A
.A
TFN)super_filterparenttyper   r   r1   r   )r   rQ   r"   imported_names	__class__s   f&  r   r   FixtureFilter._filter   s     GOE*D{{=0!,T-@-@$!G3 !/333 !/   J !!$"5"5t<<
 +s   A#B>*B>'B>4
B>c                   VP                   pVP                  R 8w  d   R# VP                   pVP                  R8w  d   R# VP                  ^ ,          pVP                  R8X  d   VP                  pMV.pV F  pVP                  ^,          pRVP                  4       9   g   K-  VP                  R8X  dK   VP                  R
,          pVP	                  4       p	V	R8X  d   \        WRR7      p
M#VP                  V4      p
MVP                  V4      p
V
 F(  pVP                  P                  RR	7      R8X  g   K&    R# 	  K  	  R# )rd   F	decoratedrg   r   	atom_expr)T)cut_own_trailerr   )_pytestrK   r   )	r   r   childrenrk   get_last_leafr   
infer_noder"   r#   )r   r[   r"   rd   r   rg   	decoratordotted_namelast_trailer	last_leafrZ   r   s   &&&         r   r   FixtureFilter._is_fixture   s"   ++<<9$NN	>>[(''*
??l*#,,J$J#I#,,Q/KK0022##{2 $/#7#7#;L , : : <I C'!3#" ")!3!3K!@$//<F#Ezz5545PAB# $# $* r   r   )	__name__
__module____qualname____firstlineno__r   r   __static_attributes____classdictcell____classcell__)r   __classdict__s   @@r   rY   rY      s      " "r   rY   ))r   monkeypatch)r   capture)r   logging)r   tmpdir)r   pytester)F)r   r    r   pathlibr   
parso.treer   jedi.inference.cacher   jedi.inference.importsr   r   jedi.inference.filtersr	   jedi.inference.base_valuer
   r   jedi.inference.helpersr   r   r   rN   rT   r`   rE   rC   rW   r   rX   rY   r   r   r   <module>r      sx    
   & = E 3 9 5 	,^ 
5C
Y< ,  ,@3$ 3r   