509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3

  \4  ã            1   @   s°   d Z ddlmZ ddlmZmZ ddddddd	d
dddddddddddddddddddddddd d!d"d"d#d$d%d&d'd(d(d(d)d*d*d+d,d-œ0Zd.d/„ Zefd0d1„ZG d2d3„ d3ej	ƒZ
d4S )5z/Fix incompatible imports and module references.é   )Ú
fixer_base)ÚNameÚ
attr_chainÚioÚpickleÚbuiltinsÚcopyregZqueueZsocketserverZconfigparserÚreprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbaseÚwinregÚ_threadZ_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuzxmlrpc.clientzxmlrpc.serverzhttp.clientzhtml.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.serverÚ
subprocessÚcollectionszurllib.parsezurllib.robotparser)0ÚStringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParserÚreprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbaseÚ_winregZthreadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZCGIHTTPServerZcommandsÚ
UserStringÚUserListZurlparseZrobotparserc             C   s   ddj tt| ƒƒ d S )Nú(ú|ú))ÚjoinÚmapr   )Úmembers© r   ú1/usr/lib64/python3.6/lib2to3/fixes/fix_imports.pyÚ
alternates=   s    r   c             c   sT   dj dd„ | D ƒƒ}t| jƒ ƒ}d||f V  d| V  d||f V  d| V  d S )Nz | c             S   s   g | ]}d | ‘qS )zmodule_name='%s'r   )Ú.0Úkeyr   r   r   ú
<listcomp>B   s    z!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z›import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z´import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)r   r   Úkeys)ÚmappingZmod_listZ
bare_namesr   r   r   Úbuild_patternA   s    
r!   c                   sT   e Zd ZdZdZeZdZdd„ Z‡ fdd„Z	‡ fdd„Z
‡ fd	d
„Zdd„ Z‡  ZS )Ú
FixImportsTé   c             C   s   dj t| jƒƒS )Nr   )r   r!   r    )Úselfr   r   r   r!   `   s    zFixImports.build_patternc                s   | j ƒ | _tt| ƒjƒ  d S )N)r!   ZPATTERNÚsuperr"   Úcompile_pattern)r$   )Ú	__class__r   r   r&   c   s    
zFixImports.compile_patternc                sH   t t| ƒj‰ ˆ |ƒ}|rDd|kr@t‡ fdd„t|dƒD ƒƒr@dS |S dS )NÚbare_with_attrc             3   s   | ]}ˆ |ƒV  qd S )Nr   )r   Úobj)Úmatchr   r   ú	<genexpr>q   s    z#FixImports.match.<locals>.<genexpr>ÚparentF)r%   r"   r*   Úanyr   )r$   ÚnodeÚresults)r'   )r*   r   r*   j   s    zFixImports.matchc                s   t t| ƒj||ƒ i | _d S )N)r%   r"   Ú
start_treeÚreplace)r$   ZtreeÚfilename)r'   r   r   r0   v   s    zFixImports.start_treec             C   sž   |j dƒ}|rh|j}| j| }|jt||jd�ƒ d|krD|| j|< d|krš| j|ƒ}|rš| j||ƒ n2|d d }| jj |jƒ}|rš|jt||jd�ƒ d S )NZmodule_name)ÚprefixZname_importZmultiple_importsr(   é    )ÚgetÚvaluer    r1   r   r3   r*   Ú	transform)r$   r.   r/   Z
import_modZmod_nameÚnew_nameZ	bare_namer   r   r   r7   z   s    



zFixImports.transform)Ú__name__Ú
__module__Ú__qualname__ZBM_compatibleZkeep_line_orderÚMAPPINGr    Z	run_orderr!   r&   r*   r0   r7   Ú__classcell__r   r   )r'   r   r"   U   s   r"   N)Ú__doc__Ú r   Z
fixer_utilr   r   r<   r   r!   ZBaseFixr"   r   r   r   r   Ú<module>   sj   