
    e                        d dl mZ g dZd dlZd dlZd dlmZ d dlmZ d dl	m
Z
 dddZdddZddd	Zddd
ZddZe
Zy)    )annotations)__version__versionmodify_sys_path
run_pylintrun_symilarrun_pyreverseN)Sequence)NoReturn)r   c                    ddl m} 	  || xs t        j                  dd        y# t        $ r t        j
                  d       Y yw xY w)zjRun pylint.

    argv can be a sequence of strings normally supplied as arguments on the command line
    r   Run   N)pylint.lintr   sysargvKeyboardInterruptexit)r   	PylintRuns     1/usr/lib/python3/dist-packages/pylint/__init__.pyr   r      s=    
 -$&#((12,' s   & AAc                J    ddl m}  || xs t        j                  dd        y)zqRun pylint-config.

    argv can be a sequence of strings normally supplied as arguments on the command line
    r   )_PylintConfigRunr   N)pylint.lint.runr   r   r   )r   r   s     r   _run_pylint_configr   '   s    
 1T)SXXab\*    c                J    ddl m}  || xs t        j                  dd        y)zmRun pyreverse.

    argv can be a sequence of strings normally supplied as arguments on the command line
    r   r   r   N)pylint.pyreverse.mainr   r   r   )r   PyreverseRuns     r   r	   r	   1   s    
 :%!"&r   c                J    ddl m}  || xs t        j                  dd        y)zkRun symilar.

    argv can be a sequence of strings normally supplied as arguments on the command line
    r   r   r   N)pylint.checkers.similarr   r   r   )r   
SimilarRuns     r   r   r   ;   s    
 :t#sxx|$r   c                    t        j                         } t        j                  d   dd| fv rt        j                  j	                  d       t         j
                  j                  dd      }|j                  d      r)|d|  dfvr t        j                  j	                  d       y	|j                  d      r*||  ddfvr t        j                  j	                  d       y	y	y	)
a  Modify sys path for execution as Python module.

    Strip out the current working directory from sys.path.
    Having the working directory in `sys.path` means that `pylint` might
    inadvertently import user code from modules having the same name as
    stdlib or pylint's own modules.
    CPython issue: https://bugs.python.org/issue33053

    - Remove the first entry. This will always be either "" or the working directory
    - Remove the working directory from the second and third entries
      if PYTHONPATH includes a ":" at the beginning or the end.
      https://github.com/pylint-dev/pylint/issues/3636
      Don't remove it if PYTHONPATH contains the cwd or '.' as the entry will
      only be added once.
    - Don't remove the working directory from the rest. It will be included
      if pylint is installed in an editable configuration (as the last item).
      https://github.com/pylint-dev/pylint/issues/4161
    r    .
PYTHONPATH:z:.z.:r   N)	osgetcwdr   pathpopenvironget
startswithendswith)cwdenv_pythonpaths     r   r   r   E   s    & ))+C
xx{r3n$QZZ^^L"5N  %.1SED@Q*QQ		 	 	%.C5D@Q*QQ +R	%r   )N)r   Sequence[str] | NonereturnNone)r   r1   r2   r   )r2   r3   )
__future__r   __all__r'   r   collections.abcr
   typingr   pylint.__pkginfo__r   r   r   r	   r   r   r    r   r   <module>r:      sB   
 # 
 
 $  *

+'%: r   