
    ue"                     h    d dl Z d dlZd dlZd dlmZmZ  ej                  e      ZdZ	dZ
ed        Zy)    N)hookimpllsp	threshold   c                 P   |j                  d      5  | j                  d|j                        j                  t        t
              }t        j                  d|       	 t        |j                  |j                  dt        j                        }t        j                         }|j                  ||       g }|j                   j#                         D ]  }|j%                         |k\  s|j'                  d|j(                  dz
  |j*                  d|j(                  dz
  t-        |j.                  |j(                           ddd	|j%                         d
|dt0        j2                  j4                  d        |cd d d        S # t        $ r Y d d d        y w xY w# 1 sw Y   y xY w)Nzlint: mccabemccabe)document_pathz&Running mccabe lint with threshold: %sexec   )line	character)startendz Cyclomatic complexity too high: z (threshold ))sourcerangemessageseverity)report_progressplugin_settingspathget	THRESHOLDDEFAULT_THRESHOLDlogdebugcompiler   astPyCF_ONLY_ASTSyntaxErrorr   PathGraphingAstVisitorpreordergraphsvalues
complexityappendlinenocolumnlenlinesr   DiagnosticSeverityWarning)config	workspacedocumentr   treevisitordiagsgraphs           ;/usr/lib/python3/dist-packages/pylsp/plugins/mccabe_lint.py
pylsp_lintr5      s}   		"	">	2 %**88==*QUU(
	 			:IF	8??HMM63CTCTUD
 //1w'^^**, 	E!Y."* ).q(8-2\\&
 ).q(8-01M-N$	" !++-y$:$'$:$:$B$B	* K% %  	% %	% %s8   AF0FAF(BF	FFFFF%)r   loggingr   pylspr   r   	getLogger__name__r   r   r   r5        r4   <module>r<      sD       g!	  
& 
&r;   