ok
Direktori : /opt/alt/python311/lib64/python3.11/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/__pycache__/rlcompleter.cpython-311.opt-2.pyc |
� �f� � �� � d dl Z d dlZd dlZd dlZd dlZd dlZdgZ G d� d� � Zd� Z d dl Z e j e� � j � � e j d� � � dZ dS # e$ r dZ Y dS w xY w)� N� Completerc �. � e Zd Zdd�Zd� Zd� Zd� Zd� ZdS )r Nc � � |r$t |t � � st d� � �|� d| _ d S d| _ || _ d S )Nznamespace must be a dictionary� r )� isinstance�dict� TypeError�use_main_ns� namespace)�selfr s �2/opt/alt/python311/lib64/python3.11/rlcompleter.py�__init__zCompleter.__init__* sZ � � � � >�Z� �4�8�8� >��<�=�=�=� �� �D���� �D��&�D�N�N�N� c � � | j rt j | _ |� � � s:|dk r2t r)t j d� � t j � � dS dS d S |dk r9d|v r| � |� � | _ n| � |� � | _ | j | S # t $ r Y d S w xY w)Nr � � �.) r �__main__�__dict__r �strip�_readline_available�readline�insert_text� redisplay�attr_matches�matches�global_matches� IndexError)r �text�states r �completezCompleter.completeE s� � � � �� /�%�.�D�N��z�z�|�|� ���z�z�&� ��(��.�.�.��&�(�(�(��2��4��t��A�:�:��d�{�{�#�0�0��6�6����#�2�2�4�8�8��� ��<��&�&��� � � ��4�4� ���s �(B5 �5 C�Cc � � t |� � r5|dz } t j |� � j s|dz }n# t $ r Y nw xY w|S )N�(�))�callable�inspect� signature� parameters� ValueError)r �val�words r �_callable_postfixzCompleter._callable_postfixd se � ��C�=�=� ��C�K�D� ��(��-�-�8� ��C�K�D���� � � ��� ���� �s �5 � A�Ac � � g }dh}t |� � }t j t j z D ]M}|d |� |k r=|� |� � |dv r|dz }n |dvr|dz }|� |� � �N| j t j fD ]l}|� � � D ]U\ }}|d |� |k rB||vr>|� |� � |� | � ||� � � � �V�m|S )N�__builtins__> �try�finally�:> �_�None�True�else�pass�False�break�continue� )�len�keyword�kwlist� softkwlist�add�appendr �builtinsr �itemsr, )r r r �seen�nr+ �nspacer* s r r zCompleter.global_matcheso s7 � � � �������I�I���N�W�%7�7� %� %�D��B�Q�B�x�4�����������-�-�-��#�:�D�D�� "/� /� /� �#�:�D����t�$�$�$���~�x�'8�9� F� F�F�#�\�\�^�^� F� F� ��c�����8�t�#�#��D�(8�(8��H�H�T�N�N�N��N�N�4�#9�#9�#�t�#D�#D�E�E�E�� F� �r c �� � t j d|� � }|sg S |� dd� � \ }} t || j � � }n# t $ r g cY S w xY wt t |� � � � }|� d� � t |d� � r<|� d� � |� t |j � � � � g }t |� � }|dk rd} n|dk rd} nd } |D ]�} | d |� |k r�| r| d |dz � | k s�|�d | ��}t t! t# |� � | d � � t$ � � r|� |� � �qt! || d � � x}�*|� | � ||� � � � ��|� |� � ��|s| sn| dk rd} nd } ��|� � � |S )Nz(\w+(\.\w+)*)\.(\w*)r � r. � __class__r r2 �__Tr )�re�match�group�evalr � Exception�set�dir�discard�hasattrr? �update�get_class_membersrH r; r �getattr�type�propertyr@ r, �sort) r r �m�expr�attr� thisobject�wordsr rD �noprefixr+ rK �values r r zCompleter.attr_matches� s? � � � �H�,�d�3�3��� ��I��W�W�Q��]�]� ��d� ��d�D�N�3�3�J�J��� � � ��I�I�I� ���� �C� �O�O�$�$�� � � �n�%�%�%��:�{�+�+� B��I�I�k�"�"�"��L�L�*�:�+?�@�@�A�A�A�����I�I���2�:�:��H�H� �S�[�[��H�H��H� �� .� .����!��H��$�$�!� %�&*�4�A�a�C�4�j�H�&<�&<�'+�t�t�T�T�2�E�!�'�$�z�*:�*:�D�$�"G�"G�"*�,� ,� !� ���u�-�-�-� �!(��T�4�!@�!@�@��M����t�'=�'=�e�U�'K�'K�L�L�L�L����u�-�-�-��� �h� ���3��������1 �2 �������s �A �A�A�N)�__name__� __module__�__qualname__r r! r, r r � r r r r ) sd � � � � � �'� '� '� '�6� � �> � � �� � �6>� >� >� >� >r c �| � t | � � }t | d� � r| j D ]}|t |� � z }�|S )N� __bases__)rP rR rf rT )�klass�ret�bases r rT rT � sJ � � �e�*�*�C��u�[�!�!� 0��O� 0� 0�D��)�$�/�/�/�C�C��Jr c �* � t j d � � S r` )r � set_completerrd r r �<lambda>rl � s � �H�2�4�8�8� r TF)�atexitrA r&