
    ÆeU                         d dl mZmZ d dlmZmZmZmZmZ d dl	m
Z
mZ  G d d      Zd ZddZ G d d	      Z G d
 dej                         Z G d de      Z G d de      Z G d d      Zy)    )ListUnion)ast
exceptionspynames
pynamesdefutils)actions
importinfoc                       e Zd ZddZeej                  d               Zd Zd Z	d Z
d Zd Zd	 Zd
 Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Zd Z d Z!d Z"y) ModuleImportsNc                 J    || _         || _        d| _        || _        d| _        y )Nr   F)projectpymoduleseparating_linesfiltersorted)selfr   r   import_filters       J/usr/lib/python3/dist-packages/rope/refactor/importutils/module_imports.py__init__zModuleImports.__init__   s&      !#    c                     t        | j                        }|j                         }|j                         | _        | j
                   |D ]  }| j                  |      rd|_         |S )NT)_GlobalImportFinderr   find_import_statementsget_separating_line_countr   r   readonly)r   finderresultimport_stmts       r   importszModuleImports.imports   se     %T]]3..0 & @ @ B;;"% 0{{;/+/K(0 r   c                     t        | j                  |      }|j                  | j                  j                                |j                  S N)_GlobalUnboundNameFinderr   visitget_astunbound)r   defined_pyobjectvisitors      r   _get_unbound_namesz ModuleImports._get_unbound_names   s6    *4==:JKdmm++-.r   c                    dt         t        j                  t        j                  f   dt
        fd}t               }	 |j                  d      } ||      D cg c]  }|j                   }}|r|j                         }t        |t        j
                        rt        |j                        }|rF|j                         }t        |t        j                         r8|j#                  |j$                         |j#                  |j&                         n:t        |t        j(                        r|j#                  |j*                         nt        |t        j,                        r6t        |j*                  t.              r|j1                  |j*                         nt        |t        j2                        r	 |j                  |j4                        }	 ||	      D ]q  }
t        |
j                  t        j,                        s(t        |
j                  j*                  t.              sM|j1                  |
j                  j*                         s 	 |rnt        |t        j2                        r;	 |j                  |j4                        }	|j7                  d  ||	      D               nPt        |t        j8                        r6|j#                  |j:                         |j#                  |j<                         |r|S # t        j                  $ r |cY S w xY wc c}w # t        j                  $ r Y w xY w# t        j                  $ r Y w xY w)Nnamereturnc                 Z   t        | t        j                        rO	 | j                  j	                         j                  | j                        } t        | t        j                        rOt        | t        j                        sJ | j                  S # t        j                  $ r g cY S w xY wr#   )
isinstancer   ImportedNameimported_module
get_objectget_attributeimported_namer   AttributeNotFoundErrorr   AssignedNameassignments)r,   s    r   _resolve_namez7ModuleImports._get_all_star_list.<locals>._resolve_name!   s     T7#7#78//::<JJ**D T7#7#78 dJ$;$;<<<### "88 Is   3B B*)B*__all__c              3   4   K   | ]  }|j                     y wr#   )ast_node).0
assignments     r   	<genexpr>z3ModuleImports._get_all_star_list.<locals>.<genexpr>_   s      '0:
++'s   )r   r   r6   r   r0   r   setr3   r   r5   r;   popr/   r   listeltsIfExpappendbodyorelseStarredvalueConstantstraddNameidextendBinOpleftright)r   r   r8   r   all_star_listr=   r7   stackelr,   avs              r   _get_all_star_listz ModuleImports._get_all_star_list    s   	$
//1E1EEF	$	$ 	$229=M
 3@2N
$.J
 
 $*J*chh/Z__-B!"cii0RWW-RYY/#B4#**2884%b#,,7JrxxQT<U"JJrxx0'CHH5F'/'='=bee'D +8*= !FB'1(*(+(& +5(*(9(9(++& )/

2;;3D3D(E!F! 2 J1#11*--@D  && '>KD>Q'  J		2"":??3"":#3#34Q R i 00 	M	
2 $.#D#D ) () "88 s;   K? L7L /L9 ?LLL65L69MMc                 .   t        | j                  | j                        | j                  | j                        z  dhz        }t	        j
                  | j                  | j                         |      }| j                  D ]  }|j                  |        y )Nr9   )
_OneTimeSelectorr*   r   rV   r
   RemovingVisitorr   _current_folderr!   acceptr   
can_selectr)   import_statements       r   remove_unused_importsz#ModuleImports.remove_unused_importsg   s    %##DMM2%%dmm45k


 ))LL$..0*
 !% 	-##G,	-r   c                 *   g }t        | j                  |            }t        j                  | j                  | j                         |      }| j                  D ]8  }|j                  |      }||j                         r(|j                  |       : |S r#   )
rX   r*   r
   FilteringVisitorr   rZ   r!   r[   is_emptyrD   )r   r(   r   r]   r)   r^   
new_imports          r   get_used_importszModuleImports.get_used_importss   s    %d&=&=>N&OP
**LL$..0*
 !% 	*)009J%j.A.A.Cj)	* r   c                    | j                   j                  j                  d      s6| j                  s*dj	                  | j                  | j                              S d }| j                  D ]E  }|?|j                  j                         r%t        |j                  |j                        |_
        |}G | j                  D cg c]  }|j                  j                         r|! }}| j                  | j                        }| j                  |d      }| j                         dz
  }g }|j                  |||        t        || j                        }|D ]J  }||d   k7  r|j!                  d|j                  z         |j!                  |j#                         dz          L |r,|t%        |      k  r|j!                  d| j&                  z         | j                  ||      }	|j                  ||	d         dj	                  |      S c c}w )Npull_imports_to_top r      key
)r   prefsgetr   join_rewrite_importsr!   import_inforb   maxblank_lines_remove_imports_first_non_blank_line_first_import_linerN   _get_locationrD   get_import_statementlenr   )
r   	prev_stmtstmtr!   after_removingfirst_non_blankfirst_importr   sorted_importsfirst_after_importss
             r   get_changed_sourcez ModuleImports.get_changed_source   s   ||!!%%&;<T[[77400>?? 	LL 	D$)>)>)G)G)I#&y'<'<d>N>N#O I	
 %)LLTD8H8H8Q8Q8S4TT--dll;44^QG..014n_\BCT-?-?@" 	>D~a((dT%5%556MM$335<=	> oN0CCMM$!6!667 #88Vn%8%9:;wwv) Us    H Hc                 P    |j                         }||j                         d   }|S Nr   get_new_startget_old_location)r   rz   starts      r   _get_import_locationz"ModuleImports._get_import_location   s-    ""$=))+A.Er   c                 h    |j                         |j                         S |j                         d   S r   r   )r   rz   s     r   rv   zModuleImports._get_location   s4    +%%''((*1--r   c                 \   | j                   j                  j                  d      }g }| j                         }d}|D ]Y  }|j	                         \  }}d}	||k7  rt        |j                  |dz
  |dz
  d      }	|j                  |||dz
  |	z
          |dz
  }[ |j                  ||d         |S )NTr      rh   )r   source_code
splitlinesru   r   _count_blank_lines__getitem__rN   )
r   r!   linesr{   first_import_line
last_indexrz   r   endrr   s
             r   rs   zModuleImports._remove_imports   s    ))44T: 335
 	!D..0JE3K))0%%uqy*q." !!%
UQY5L"MNqJ	! 	eJK01r   c                 d   | j                   j                  j                  d      }g }d}|D ]m  }|j                         \  }}|j	                  |||dz
          |j
                  j                         s"|j                  |j                         dz          |dz
  }o |j	                  ||d         |S )NTr   rh   rk   )	r   r   r   r   rN   rp   rb   rD   rw   )r   r!   r   after_rewritingr   rz   r   r   s           r   ro   zModuleImports._rewrite_imports   s    ))44T:
 	!D..0JE3""5eai#@A##,,.&&t'@'@'BT'IJqJ	! 	uZ[12r   c                 H    |t        |j                  |t        |            z   S r#   )r   r   rx   )r   r   linenos      r   rt   z#ModuleImports._first_non_blank_line   s!    *5+<+<fc%jQQQr   c                 2   t        j                  | j                  |g      }| j                  D ]  }|j	                  |      s y  | j                         }| j                         }| j                  j                  t        j                  ||||             y Nrr   )
r
   AddingVisitorr   r!   r[   _get_new_import_lineno_get_new_import_blanksrD   r   ImportStatement)r   rp   r)   r^   r   blankss         r   
add_importzModuleImports.add_import   s    ''{mD $ 
	&&w/
	 002F002FLL**Vr   c                      yr    r   s    r   r   z$ModuleImports._get_new_import_blanks   s    r   c                 N    | j                   r| j                   d   j                  S y)Nr   rh   )r!   end_liner   s    r   r   z$ModuleImports._get_new_import_lineno   s!    <<<<#,,,r   c                     t        j                  | j                  | j                         |      }| j                  D ]  }|j                  |        y r#   )r
   rY   r   rZ   r!   r[   r\   s       r   filter_nameszModuleImports.filter_names   sJ    ))LL$..0*
 !% 	-##G,	-r   c                     t        | j                  | j                              }t        j                  | j
                  | j                         |      }| j                  D ]  }|j                  |        y r#   )	rX   r*   r   r
   ExpandStarsVisitorr   rZ   r!   r[   r\   s       r   expand_starszModuleImports.expand_stars   sc    %d&=&=dmm&LM
,,LL$..0*
 !% 	-##G,	-r   c                     g }| j                   D ]g  }t        j                  | j                  |j                  g      }|D ]$  }|j                  |      s|j                          & |j                  |       i y r#   )r!   r
   r   r   rp   r[   empty_importrD   )r   added_importsr    r)   added_imports        r   remove_duplicateszModuleImports.remove_duplicates   sr    << 	2K++DLL;;R;R:STG - 2&&w/,,.2 $$[1	2r   c                    | j                   dd D ]  }|j                  }|j                         s|j                  r,t	        |j
                        dkD  sE|j
                  D ]b  }t        |d      r-t        j                  |j                  |j                  |g      }nt        j                  |g      }| j                  |       d |j                           y)z#force a single import per statementNrh   module_name)r!   rp   rb   r   rx   names_and_aliaseshasattrr   
FromImportr   levelNormalImportr   r   )r   r    rp   name_and_aliasrc   s        r   force_single_importsz"ModuleImports.force_single_imports   s    <<? 	+K%11K##%)=)=;001A5&1&C&C 0N{M:%/%:%:'33[5F5FHX&
 &0%<%<n=M%N
OOJ/0 ((*	+r   c                     t        j                  | j                  | j                               }| j                  D ]   }|j
                  r|j                  |       " |j                  S r#   )r
   RelativeToAbsoluteVisitorr   rZ   r!   r   r[   to_be_absoluter   r)   r    s      r   get_relative_to_absolute_listz+ModuleImports.get_relative_to_absolute_list  s^    33LL$..0
  << 	,K''""7+	, %%%r   c                    t        j                  | j                  | j                         | j                  j                               }| j                  D ]   }|j                  r|j                  |       " |j                  |j                  fS r#   )r
   SelfImportVisitorr   rZ   r   get_resourcer!   r   r[   to_be_fixedto_be_renamedr   s      r   #get_self_import_fix_and_rename_listz1ModuleImports.get_self_import_fix_and_rename_list  sx    ++LL$..0$--2L2L2N
  << 	,K''""7+	, ""G$9$999r   c                 J    | j                   j                         j                  S r#   )r   r   parentr   s    r   rZ   zModuleImports._current_folder   s    }}))+222r   c                    | j                   j                  j                  d      rt        | j                        }nt        | j
                        }t        j                  | j                   | j                               }| j                  D ]  }|j                  |        t        |j                  fi |}t        |j                  fi |}t        |j                  fi |}t        |j                  fi |}| j!                         }| j#                  ||d      }| j#                  ||d      }| j#                  ||d      }| j#                  ||d      }d| _        d| _        y )Nsort_imports_alphabeticallyri   r   rh   r   T)r   rl   rm   dict_get_import_name_key_importsr
   SortingVisitorrZ   r!   r[   r   
in_projectthird_partystandardfutureru   _move_importsr   )	r   sort_kwargsr)   r^   in_projectsr   	standardsr   r   s	            r   sort_importszModuleImports.sort_imports#  s=   <<!!"?@4#8#89K4#4#45K ((t7K7K7MN $ 	-##G,	-W//?;?W00@K@7++;{;	6+6,,.
''
A>
''	:qA
''ZC
''ZC
 !r   c                 N   | j                   j                         j                  }d}| j                   j                         d}t	        |      |kD  rt        ||   t        j                        st        ||   t        j                        r||   j                  S t        ||         }| j                   j                  j                  |      d   }n$| j                   j                  j                         }|t        | j                   j                  j                   |dz
  dd      z
  S )Nr   rh   r   )r   r&   rE   get_docrx   r/   r   Import
ImportFromr   *get_first_decorator_or_function_start_linelogical_lineslogical_line_inr   lengthr   get_line)r   nodesr   
first_lines       r   ru   z ModuleImports._first_import_line9  s    %%',,==  ".Fu:%-4
fs~~9 V}+++CE&MRJ]]00@@LQOF]]((//1F*MM((&1*a
 
 	
r   c                     |j                   }t        |d      r,dj                  |j                  |j                  d   d         S |j                  d   d   S )Nr   z{}.{}r   )rp   r   formatr   r   )r   r    rp   s      r   r   zModuleImports._get_import_nameL  s\    !--;.>>''--a03 
 003A66r   c                 H    |j                         }|j                  d      |fS )Nzfrom )rw   
startswith)r   stm1str1s      r   r   zModuleImports._key_importsV  s$    ((*w'--r   c                     |rH|d   j                  ||       |dz  }t        |      dkD  r |dd  D ]  }|j                  |       |dz  } |S )Nr   rh   )moverx   )r   r!   indexrr   rz   s        r   r   zModuleImports._move_importsb  s]    AJOOE;/QJE7|a#ABK DIIe$QJE r   c                    t        j                  | j                         | j                  ||      }| j                  D ]   }|j
                  r|j                  |       " |j                  D ]  }| j                  |        |j                  S r#   )
r
   LongImportVisitorrZ   r   r!   r   r[   new_importsr   r   )r   maxdots	maxlengthr)   r^   rp   s         r   handle_long_importsz!ModuleImports.handle_long_importsl  s    ++  "DLL'9
 !% 	1#,, ''0	1 #.. 	)KOOK(	)$$$r   c                     t        j                  | j                  | j                  || j	                               }| j
                  D ]  }|j                  |        y)z5Removes pyname when imported in ``from mod import x``N)r
   RemovePyNameVisitorr   r   rZ   r!   r[   )r   pynamer)   r    s       r   remove_pynamezModuleImports.remove_pynamew  sO    --LL$--1E1E1G
  << 	(Kw'	(r   r#   )#__name__
__module____qualname__r   propertyr	   saveitr!   r*   rV   r_   rd   r   r   rv   rs   ro   rt   r   r   r   r   r   r   r   r   r   rZ   r   ru   r   r   r   r   r   r   r   r   r   r      s     
\\  
EN
-
 D."R
--2+"&:3,
&7.	%(r   r   c                     t        | dg       }t        |D cg c]  }|j                   c}| j                  gz         }|S c c}w )Ndecorator_list)getattrminr   )node
decorators	decoratorr   s       r   r   r     sC    /4J
C9i&&Ct{{mSTJ Ds   Ac                 p    d}t        |||      D ]#  } | |      j                         dk(  r|dz  }" |S  |S )Nr   rg   rh   )rangestrip)r   r   r   stepcountidxs         r   r   r     sL    EUC& C= B&QJEL
 Lr   c                   $    e Zd Zd Zd Zd Zd Zy)rX   c                 0    || _         t               | _        y r#   )namesr?   selected_names)r   r  s     r   r   z_OneTimeSelector.__init__  s    
!er   c                     | j                  |      r2| j                  |      D ]  }| j                  j                  |        yyNTF)_can_name_be_added_get_dotted_tokensr  rK   r   imported_primaryr,   s      r   __call__z_OneTimeSelector.__call__  sF    ""#34//0@A .##''-.r   c              #      K   |j                  d      }t        t        |            D ]  }dj                  |d |dz            y wN.rh   )splitr   rx   rn   )r   r  tokensis       r   r  z#_OneTimeSelector._get_dotted_tokens  sG     !'',s6{# 	,A((6'AE?++	,s   AAc                 n    | j                  |      D ]!  }|| j                  v s|| j                  vs! y yr
  )r  r  r  r  s      r   r  z#_OneTimeSelector._can_name_be_added  s>    ++,<= 	Dtzz!d$2E2E&E	 r   N)r   r   r   r   r  r  r  r   r   r   rX   rX     s    $,
r   rX   c                   D    e Zd Zd Zd Zd Zd Zd Zd Zd Z	ddZ
d	 Zy
)_UnboundNameFinderc                     || _         y r#   )pyobject)r   r  s     r   r   z_UnboundNameFinder.__init__  s	     r   c                    | j                   j                         j                         j                  |j                        j                   }t        ||       }t        j                  |      D ]  }|j                  |        y r#   )	r  
get_module	get_scopeget_inner_scope_for_liner   _LocalUnboundNameFinderr   iter_child_nodesr%   )r   r   r  r)   childs        r   _visit_child_scopez%_UnboundNameFinder._visit_child_scope  sf    MM$$&Y[%%dkk2X	 	 *(D9))$/ 	!EMM% 	!r   c                 &    | j                  |       y r#   r"  r   r   s     r   _FunctionDefz_UnboundNameFinder._FunctionDef      %r   c                 &    | j                  |       y r#   r$  r%  s     r   	_ClassDefz_UnboundNameFinder._ClassDef  r'  r   c                     | j                         j                  |      r8| j                  |j                        s| j	                  |j                         y y y r#   )	_get_root_is_node_interestingis_boundrM   add_unboundr%  s     r   _Namez_UnboundNameFinder._Name  sB    >>006t}}TWW?UTWW% @V6r   c                    g }t        |t        j                        rB|j                  |j                         |j
                  }t        |t        j                        rBt        |t        j                        ry|j                  |j                         dj                  t        |            }| j                         j                  |      r$| j                  |      s| j                  |       y y y | j                  |       y )Nr  )r/   r   	AttributerD   attrrH   rL   rM   rn   reversedr+  r,  r-  r.  r%   )r   r   r   primarys       r   
_Attributez_UnboundNameFinder._Attribute  s    s}}-MM$))$::D s}}- dCHH%MM$''"hhx/0G~~44T:4==D   )D:
 JJtr   c                      y r#   r   r   s    r   r+  z_UnboundNameFinder._get_root      r   c                      y r#   r   )r   r,   
propagateds      r   r-  z_UnboundNameFinder.is_bound  r7  r   c                      y r#   r   r   r,   s     r   r.  z_UnboundNameFinder.add_unbound  r7  r   NF)r   r   r   r   r"  r&  r)  r/  r5  r+  r-  r.  r   r   r   r  r    s/    !	!&&&r   r  c                   8     e Zd Z fdZd ZddZd Zd Z xZS )r$   c                    t         |   |       t               | _        t               | _        |j                         j                         D ]K  \  }}t        |t        j                  t        j                  f      r1| j                  j                  |       M |j                         }|j                         | _        |j                         dz   | _        y Nrh   )superr   r?   r'   r  _get_structural_attributesitemsr/   r   r0   ImportedModulerK   r  	get_startr   get_endr   )r   r   wanted_pyobjectr,   r   wanted_scope	__class__s         r   r   z!_GlobalUnboundNameFinder.__init__  s    "uU
$??AGGI 	%LD&fw';';W=S=S&TU

t$	% '002!++-
'')A-r   c                     | S r#   r   r   s    r   r+  z"_GlobalUnboundNameFinder._get_root  s    r   c                 F    |j                  d      d   }|| j                  v S )Nr  r   )r  r  )r   r4  r9  r,   s       r   r-  z!_GlobalUnboundNameFinder.is_bound  s$    }}S!!$tzz!!r   c           	          |j                  d      }t        t        |            D ]2  }| j                  j	                  dj                  |d |dz                 4 y r  )r  r   rx   r'   rK   rn   )r   r,   r  r  s       r   r.  z$_GlobalUnboundNameFinder.add_unbound  sL    

3s5z" 	7ALLSXXeGa!en56	7r   c                 ^    | j                   |j                  cxk  xr | j                  k  S c S r#   )r   r   r   r%  s     r   r,  z-_GlobalUnboundNameFinder._is_node_interesting  s$    zzT[[34883333r   r<  )	r   r   r   r   r+  r-  r.  r,  __classcell__rH  s   @r   r$   r$     s    	."7
4r   r$   c                   2     e Zd Z fdZd ZddZd Z xZS )r  c                 2    t         |   |       || _        y r#   )r@  r   r   )r   r  r   rH  s      r   r   z _LocalUnboundNameFinder.__init__  s    "r   c                 6    | j                   j                         S r#   )r   r+  r   s    r   r+  z!_LocalUnboundNameFinder._get_root  s    {{$$&&r   c                    |j                  d      d   }|r)| j                  j                         j                         }n(| j                  j                         j	                         }||v xs | j
                  j                  |d      S )Nr  r   T)r9  )r  r  r  get_propagated_names	get_namesr   r-  )r   r4  r9  r,   r  s        r   r-  z _LocalUnboundNameFinder.is_bound  sq    }}S!!$MM++-BBDEMM++-779Eu}K 4 4Td 4 KKr   c                 :    | j                   j                  |       y r#   )r   r.  r;  s     r   r.  z#_LocalUnboundNameFinder.add_unbound  s    %r   r<  )r   r   r   r   r+  r-  r.  rM  rN  s   @r   r  r    s    'L&r   r  c                   B    e Zd Zd Zd Zd Zd Zd Zd Zd Z	d Z
d	 Zy
)r   c                     d | _         |j                         r&|j                         j                  | _         || _        g | _        || _        | j                  j
                  | _        y r#   )current_folderr   r   r   r!   r   )r   r   s     r   r   z_GlobalImportFinder.__init__  sS    "  ""*"7"7"9"@"@D$DM ]]((
r   c           	         |j                   }t        j                  t        j                  | j	                  |j
                              ||| j                  ||      | j                  |            }| j                  j                  |       y r   )
r   r   r   r   
_get_namesr  	_get_text_count_empty_lines_beforer!   rD   )r   r   r   
start_liner^   s        r   visit_importz _GlobalImportFinder.visit_import  sn    [[
%55##DOODJJ$?@NN:x066zB
 	,-r   c                 L    t        | j                  j                  |dz
  dd      S )Nrh   r   r   )r   r   r   r   r   s     r   r\  z-_GlobalImportFinder._count_empty_lines_before  s!    !$**"5"5vz1bIIr   c                 z    t        | j                  j                  |dz   | j                  j                               S r?  )r   r   r   r   r`  s     r   _count_empty_lines_afterz,_GlobalImportFinder._count_empty_lines_after"  s,    !$**"5"5vz4::CTCTCVWWr   c                 r    | j                   sy| j                  | j                   d   j                  dz
        S )Nr   r   rh   )r!   rb  r   r   s    r   r   z-_GlobalImportFinder.get_separating_line_count%  s1    ||,,T\\"-=-F-F-JKKr   c                     t        ||      D cg c]  }| j                  j                  |       }}dj                  |      S c c}w )Nrk   )r   r   r   rn   )r   r]  r   r   r   s        r   r[  z_GlobalImportFinder._get_text*  s@    :?
H:UV$**%%e,VVyy   Ws   "Ac                    d}|j                   r|j                   }t        j                  |j                  xs d|| j	                  |j
                              }|j                  }| j                  j                  t        j                  ||j                  || j                  ||      | j                  |                   y )Nr   rg   r   )r   r   r   modulerZ  r  r   r!   rD   r   r[  r\  )r   r   r   r   rp   r]  s         r   
visit_fromz_GlobalImportFinder.visit_from.  s    ::JJE ++KK2OODJJ'

 [[
&&z84 :::F	
r   c                 X    |D cg c]  }|j                   |j                  f c}S c c}w r#   )r,   asname)r   alias_namesaliass      r   rZ  z_GlobalImportFinder._get_namesB  s#    8CDuU\\*DDDs   'c                    | j                   j                         j                  }|D ]  }t        |t        j
                  t        j                  f      r7| j                   j                  }|j                  |j                        d   dz   }t        |t        j
                        r| j                  |       t        |t        j                        s| j                  |        | j                  S r?  )r   r&   rE   r/   r   r   r   r   r   r   r^  rg  r!   )r   r   r   r   r   s        r   r   z*_GlobalImportFinder.find_import_statementsE  s    %%',, 	0D$S^^ <=33 00=a@1D$

+!!$1$/h/	0 ||r   N)r   r   r   r   r^  r\  rb  r   r[  rg  rZ  r   r   r   r   r   r   
  s3    )	.JXL
!
(E
r   r   N)rh   )typingr   r   	rope.baser   r   r   r   r	   rope.refactor.importutilsr
   r   r   r   r   rX   RopeNodeVisitorr  r$   r  r   r   r   r   <module>rq     sk     A A 9v( v(r 0/,, /d41 48&0 &(E Er   