관리-도구
편집 파일: fix_itertools_imports.cpython-311.pyc
� c��f& � �P � d Z ddlmZ ddlmZmZmZ G d� dej � � ZdS )zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) � )� fixer_base)� BlankLine�syms�tokenc �2 � e Zd ZdZd e� � z Zd� ZdS )�FixItertoolsImportsTzT import_from< 'from' 'itertools' 'import' imports=any > c � � |d }|j t j k s|j s|g}n|j }|d d d� D ]�}|j t j k r |j }|}n<|j t j k r d S |j t j k sJ �|j d }|j }|dv rd |_ |� � � ��|dv r)|� � � |d dk rdnd |_ ��|j d d � p|g}d } |D ]3}| r*|j t j k r|� � � �.| d z } �4|r^|d j t j k rC|� � � � � � |r|d j t j k �C|j st |dd � � r|j �|j } t � � }| |_ |S d S ) N�imports� r )�imap�izip�ifilter)�ifilterfalse�izip_longest� �f�filterfalse�zip_longestT����value)�typer �import_as_name�childrenr �NAMEr �STAR�remove�changed�COMMA�pop�getattr�parent�prefixr )�self�node�resultsr r �child�member� name_node�member_name�remove_comma�ps �J/opt/alt/python311/lib64/python3.11/lib2to3/fixes/fix_itertools_imports.py� transformzFixItertoolsImports.transform s � ��)�$���<�4�.�.�.�g�6F�.��y�H�H��'�H��c�c��c�]� 7� 7�E��z�U�Z�'�'����!� � ���u�z�)�)�����z�T�%8�8�8�8�8�!�N�1�-� �#�/�K��9�9�9�"����������� @�@�@�������4?��N�c�4I�4I�=�=�(5� ��� �#�A�A�A�&�3�7�)����� %� %�E�� %�� �e�k� 9� 9����������$���� $�8�B�<�,���;�;��L�L�N�N�!�!�#�#�#� � $�8�B�<�,���;�;� �!� �W�W�g�t�%D�%D� ��N�"���A��;�;�D��D�K��K� #�"� N)�__name__� __module__�__qualname__� BM_compatible�locals�PATTERNr- � r. r, r r s= � � � � � ��M���F�H�H��G�+� +� +� +� +r. r N) �__doc__�lib2to3r �lib2to3.fixer_utilr r r �BaseFixr r5 r. r, �<module>r: st �� G� G� � � � � � � 5� 5� 5� 5� 5� 5� 5� 5� 5� 5�1� 1� 1� 1� 1�*�,� 1� 1� 1� 1� 1r.