관리-도구
편집 파일: __init__.cpython-311.pyc
� �܋f� � � � d dl mZ d dlmZ d dlmZmZ d dlmZ dZ i dd�dd �d d�dd �dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�d&d'�i d(d)�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG�dHdI��dJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdY��Z ddQdRd ddSdTdUdVdPd dWdZ�Z G d[� d\e� � Z G d]� d^e� � Z d_S )`� )� checkPath)�Reporter)�Location�Message)�ToolBase)�PyFlakesTool�UnusedImport�F401�ImportShadowedByLoopVar�F402�ImportStarUsed�F403�LateFutureImport�F404�ImportStarUsage�F405�ImportStarNotPermitted�F406�FutureFeatureNotDefined�F407�PercentFormatInvalidFormat�F501�PercentFormatExpectedMapping�F502�PercentFormatExpectedSequence�F503� PercentFormatExtraNamedArguments�F504�PercentFormatMissingArgument�F505�$PercentFormatMixedPositionalAndNamed�F506�$PercentFormatPositionalCountMismatch�F507�!PercentFormatStarRequiresSequence�F508�'PercentFormatUnsupportedFormatCharacter�F509�StringDotFormatInvalidFormat�F521�"StringDotFormatExtraNamedArguments�F522�'StringDotFormatExtraPositionalArguments�F523�StringDotFormatMissingArgument�F524�StringDotFormatMixingAutomatic�F525�FStringMissingPlaceholders�F541�MultiValueRepeatedKeyLiteral�F601�MultiValueRepeatedKeyVariable�F602�%TooManyExpressionsInStarredAssignment�F621�TwoStarredExpressions�F622�AssertTuple�F631� IsLiteral�F632�InvalidPrintSyntax�F633�IfTuple�F634�BreakOutsideLoop�F701�ContinueOutsideLoop�F702�ContinueInFinally�F703�YieldOutsideFunction�F704�F705�F706�F707�F721�F722�F723�F810�F811�F812�F821�F822�F823�F831�F841�F901)�ReturnWithArgsInsideGenerator�ReturnOutsideFunction�DefaultExceptNotLast�DoctestSyntaxError�ForwardAnnotationSyntaxError�CommentAnnotationSyntaxError� Redefined�RedefinedWhileUnused�RedefinedInListComp� UndefinedName�UndefinedExport�UndefinedLocal�DuplicateArgument�UnusedVariable�RaiseNotImplemented)�FL0001�FL0002�FL0003�FL0004�FL0005�FL0006�FL0008�FL0009�FL0010�FL0011�FL0012�FL0013c �@ � � e Zd Zd� fd� Zd d�Zd� Zd� Zd� Zd� Z� xZ S ) �ProspectorReporterNc �l �� t � � � d d � � g | _ |pd| _ d S �N� )�super�__init__� _messages�ignore)�selfr � __class__s ��s/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/prospector/tools/pyflakes/__init__.pyr} zProspectorReporter.__init__T s3 �� � ������t�$�$�$�����l������ c � � |pd}|| j v rd S t |d d ||�� � }t d|||�� � }| j � |� � d S )N�F999)�path�module�function�line� character�pyflakes)�source�code�location�message)r r r r~ �append)r� �filenamer� r� r� r� r� s r� �record_messagez!ProspectorReporter.record_messageZ s� � ��~�v���4�;����F������� � � �� ����� � � �� ����g�&�&�&�&�&r� c �6 � | � |d|�� � d S )Nr� )r� r� r� �r� )r� r� �msgs r� �unexpectedErrorz"ProspectorReporter.unexpectedErrorn s2 � ������� � � � � � r� c �: � | � |||d|�� � d S )Nr� �r� r� r� r� r� r� )r� r� r� �lineno�offset�texts r� �syntaxErrorzProspectorReporter.syntaxErrorv s8 � ��������� � � � � � r� c �� � t � |j j d� � }| � |j |j |j dz ||j |j z �� � d S )Nr� � r� ) �_MESSAGE_CODES�getr� �__name__r� r� r� �colr� �message_args)r� r� r� s r� �flakezProspectorReporter.flake sh � ��!�!�'�"3�"<�f�E�E������%����{�Q����O�g�&:�:� � � � � � r� c � � | j S �N)r~ )r� s r� �get_messageszProspectorReporter.get_messages� s � ��~�r� r� )NNNNN) r� � __module__�__qualname__r} r� r� r� r� r� � __classcell__�r� s @r� rx rx S s� �� � � � � �#� #� #� #� #� #�'� '� '� '�( � � � � � � � � �� � � � � � r� rx c �* � � e Zd Z� fd�Zd� Zd� Z� xZS )r c �H �� t � � j |i |�� d| _ d S rz )r| r} �ignore_codes)r� �args�kwargsr� s �r� r} zPyFlakesTool.__init__� s- �� ������$�)�&�)�)�)�����r� c �R � |� d� � }d� |D � � | _ d S )Nr� c �D � g | ]}t � ||� � ��S r{ )�LEGACY_CODE_MAPr� )�.0r� s r� � <listcomp>z*PyFlakesTool.configure.<locals>.<listcomp>� s( � �Q�Q�Q��_�0�0��t�<�<�Q�Q�Qr� )�get_disabled_messagesr� )r� �prospector_config�_�ignoress r� � configurezPyFlakesTool.configure� s1 � �#�9�9�*�E�E��Q�Q��Q�Q�Q����r� c �� � t | j �� � }|j D ]1}t t |� � � � � |� � �2|� � � S )N)r )rx r� �python_modulesr �str�absoluter� )r� �found_files�reporter�filepaths r� �runzPyFlakesTool.run� s` � �%�T�->�?�?�?��#�2� :� :�H��c�(�+�+�-�-�.�.��9�9�9�9��$�$�&�&�&r� )r� r� r� r} r� r� r� r� s @r� r r � sY �� � � � � �� � � � �R� R� R� '� '� '� '� '� '� 'r� r N)�pyflakes.apir �pyflakes.reporterr �prospector.messager r �prospector.tools.baser �__all__r� r� rx r r{ r� r� �<module>r� s� �� "� "� "� "� "� "� &� &� &� &� &� &� 0� 0� 0� 0� 0� 0� 0� 0� *� *� *� *� *� *� ��2��F�2��v�2� �f�2� �� 2� �v�2� �f� 2� �v�2� !�&�2� #�F�2� $�V�2� '��2� #�F�2� +�F�2� +�F�2� (��2� .�v�!2�"