Your IP : 216.73.216.213
B
A!p\^ � @ s� d Z ddlmZ ddlZddlZddlZdZdd� Zdd� Ze� d �Z
e� d
�Ze� d�Zdd
� Z
e� d�Ze� d�Zdd� Zdd� Zdd� Zdd� ZdZdZdZdZdee e eee d�Zeeedd�ZG dd� d�ZG d d!� d!�ZG d"d#� d#e�ZdS )$z9
generic classes/functions for pyreverse core/extensions
� )�print_functionNz.pyreversercc C sR g } t j�dd�}|rNt j�|t�}yt|��� �� } W n t k
rL Y nX | S )z5
Read config file and return list of options
�HOME� )
�os�environ�get�path�join�RCFILE�open�read�split�IOError)�options�homeZrcfile� r �G/opt/alt/python37/lib/python3.7/site-packages/pylint/pyreverse/utils.py�get_default_options s r c C s. t � } | �� x| D ]}tj�d|� qW dS )z'insert default options to sys.argv
� N)r �reverse�sys�argv�insert)r �argr r r �insert_default_options* s
r z^__[A-Za-z0-9]+[A-Za-z0-9_]*__$z^__[_A-Za-z0-9]*[A-Za-z0-9]+_?$z^_[_A-Za-z0-9]*$c C s8 t �| �rd}n$t�| �r d}nt�| �r0d}nd}|S )zMreturn the visibility from a name: public, protected, private or special
�special�private� protected�public)�SPECIAL�match�PRIVATE� PROTECTED)�name�
visibilityr r r �get_visibility: s
r% z
^.*Abstract.*z ^[A-Z_]*$c C s t �| j�S )zWreturn true if the given class node correspond to an abstract class
definition
)�ABSTRACTr r# )�noder r r �is_abstractM s r( c C s t �| j�S )zTreturn true if the given class/function node correspond to final
definition
)�FINALr r# )r'