Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pydocstyle/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pydocstyle/__pycache__/cli.cpython-37.pyc

B

;��Y�
�@sxdZddlZddlZddlmZddlmZddlmZm	Z	ddl
mZdZGd	d
�d
e
�Zdd�Zd
d�Zdd�ZdS)z&Command line interface for pydocstyle.�N�)�log)�Error)�ConfigurationParser�IllegalConfiguration)�check)�mainc@seZdZdZdZdZdS)�
ReturnCoderr�N)�__name__�
__module__�__qualname__�no_violations_found�violations_found�invalid_options�rr�?/opt/alt/python37/lib/python3.7/site-packages/pydocstyle/cli.pyr	sr	c	
Cs:t�tj�t�}t|���y|��Wntk
r@t	j
SX|��}t|�t�d�|j
t_
|jt_g}y2x,|��D] \}}}|�t|f||d��q|WWn4tk
r�}zt�|jd�t	j
Sd}~XYnXd}x0|D](}t|d��rtj�d|�|d7}q�W|dk�r t	j}nt	j}|j�r6t|�|S)Nzstarting in debug mode.)�select�ignore_decoratorsr�codez%s
r)r�setLevel�logging�DEBUGr�setup_stream_handlersZget_default_run_configuration�parserr	rZget_user_run_configuration�debugZexplainr�sourceZget_files_to_check�extendr�error�args�hasattr�sys�stdout�writerr�count�print)	�confZrun_conf�errors�filenameZ
checked_codesrrr$Z	exit_coderrr�run_pydocstyles@


r)cCs*yt�t��Wntk
r$YnXdS)zRun pydocstyle as a script.N)r!�exitr)�KeyboardInterruptrrrrrAsrcCs�Gdd�dtj�}gt_t�tj�}|�tj�|�	|��|j
rP|�tj�n |jrd|�tj
�n|�tj�t�|�t�tj�}d}|�tj|d��|�tj�t�|�dS)z7Setup logging stream handlers according to the options.c@seZdZdd�ZdS)z+setup_stream_handlers.<locals>.StdoutFiltercSs|jtjtjfkS)N)Zlevelnorr�INFO)�self�recordrrr�filterLsz2setup_stream_handlers.<locals>.StdoutFilter.filterN)rrr
r/rrrr�StdoutFilterKsr0z%(levelname)s: %(message)s)�fmtN)rZFilterr�handlersZ
StreamHandlerr!r"rZWARNINGZ	addFilterrr�verboser,Z
addHandler�stderrZsetFormatter�	Formatter)r&r0Zstdout_handlerZstderr_handlerZ
msg_formatrrrrIs 
r)�__doc__rr!�utilsrZ
violationsr�configrrZcheckerr�__all__�objectr	r)rrrrrr�<module>s-