Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/flake8/plugins/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/flake8/plugins/__pycache__/pyflakes.cpython-311.pyc

�

�܋f���dZddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlZddl
mZdd	lmZid
d�dd
�dd�dd�dd�dd�dd�dd�dd�dd�dd�d d!�d"d#�d$d%�d&d'�d(d)�d*d+�id,d-�d.d/�d0d1�d2d3�d4d5�d6d7�d8d9�d:d;�d<d=�d>d?�d@dA�dBdC�dDdE�dFdG�dHdI�dJdK�dLdM��dNdOdPdQdRdSdTdUdVdWdXdYdZ��ZGd[�d\ejj��ZdS)]z8Plugin built-in to Flake8 to treat pyflakes as a plugin.�N)�Any)�	Generator)�List)�Tuple)�Type)�utils)�
OptionManager�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�F706�F707�F721�F722�F723�F811�F821�F822�F823�F831�F841�F901)�ReturnOutsideFunction�DefaultExceptNotLast�DoctestSyntaxError�ForwardAnnotationSyntaxError�CommentAnnotationSyntaxError�RedefinedWhileUnused�
UndefinedName�UndefinedExport�UndefinedLocal�DuplicateArgument�UnusedVariable�RaiseNotImplementedc���eZdZUdZdZgZeeed<gZ	eeed<de
jdeej
dedd	f�fd
�Zededd	fd���Zed
ejdd	fd���Zdeeeeeeefd	d	ffd�Z�xZS)�
FlakesCheckerz=Subclass the Pyflakes checker to conform with the flake8 API.F�include_in_doctest�exclude_from_doctest�tree�file_tokens�filename�returnNc�,����tj����|j}�fd�|jD��}|rd}|jD]1��dkr)�����rd}�fd�|D��}|rd}�2t
���|�||���dS)z=Initialize the PyFlakes plugin with an AST tree and filename.c�J��g|]}|dk���|���|�� S)���
startswith)�.0�includerls  ��h/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/plugins/pyflakes.py�
<listcomp>z*FlakesChecker.__init__.<locals>.<listcomp>Ss<���
�
�
���"�}�}��!4�!4�W�!=�!=�}�
��}�}�TrpFc�>��g|]}|�����|��S�rq)rsrt�excludes  �rurvz*FlakesChecker.__init__.<locals>.<listcomp>^s=��� � � ���)�)�'�2�2� �� � � rw)rl�withDoctestrkN)r�normalize_path�with_doctestrhrirr�super�__init__)	�selfrjrkrlr}�included_by�overlaped_byrz�	__class__s	   `   @�rurzFlakesChecker.__init__Js�������'��1�1���(��
�
�
�
��2�
�
�
��
�	 ��L��0�
	(�
	(�G��"�}�}��!4�!4�W�!=�!=�}�$�� � � � �#.� � � �� �(�#'�L��
�������$�#�		�	
�	
�	
�	
�	
rw�parserc	���|�dddd���|�ddddd�	��|�d
dddddd
���|�ddddddd���dS)z:Register options for PyFlakes on the Flake8 OptionManager.z
--builtinsTz&define more built-ins, comma separated)�parse_from_config�comma_separated_list�helpz
--doctestsF�
store_truez!also check syntax of the doctests)�default�actionr�r�z--include-in-doctestrprhz Run doctests only on these files)r��destr�r��normalize_pathsr�z--exclude-from-doctestriz&Skip these files when running doctestsN)�
add_option)�clsr�s  ru�add_optionszFlakesChecker.add_optionsns���	����"�!%�9�		�	
�	
�	
�	������"�4�	�	
�	
�	
�	���"��%�"�!%� �3�	�	
�	
�	
�	���$��'�"�!%� �9�	�	
�	
�	
�	
�	
rw�optionsc���|jr$|j�|j��|_|j|_g}|jD]Y}|dkr�	|�tjddf��s|�	d|�����D|�	|���Ztj|��|_g}|jD]Y}|dkr�	|�tjddf��s|�	d|�����D|�	|���Ztj|��|_t|j���|j��}|rt|�d����dS)z0Parse option values from Flake8's OptionManager.rpz./z~/z� was specified in both the include-in-doctest and exclude-from-doctest options. You are not allowed to specify it in both for doctesting.N)�builtins�builtIns�union�doctestsr}rhrr�os�sep�appendrr�ri�set�intersection�
ValueError)r�r��included_files�
included_file�excluded_files�
excluded_file�inc_excs       ru�
parse_optionszFlakesChecker.parse_options�s�����	@��<�-�-�g�.>�?�?�C�L�"�+�����$�7�	5�	5�M���"�"�� �+�+�R�V�T�4�,@�A�A�
5��%�%�&:�=�&:�&:�;�;�;�;��%�%�m�4�4�4�4�!&�!6�~�!F�!F�����$�9�	5�	5�M���"�"�� �+�+�R�V�T�4�,@�A�A�
5��%�%�&:�=�&:�&:�;�;�;�;��%�%�m�4�4�4�4�#(�#8��#H�#H�� ��c�,�-�-�:�:��$�
�
���	���(�(�(���
�	�	rwc
#�K�|jD]q}t|dd��}|j|d�t�t
|��jd��|j|j	z��|j
fV��rdS)zRun the plugin.�colrz{} {}�F999N)�messages�getattr�lineno�format�FLAKE8_PYFLAKES_CODES�get�type�__name__�message�message_argsr�)r�r�r�s   ru�runzFlakesChecker.run�s������}�
	�
	�G��'�5�!�,�,�C�������)�-�-�d�7�m�m�.D�f�M�M��O�g�&:�:����!��
�
�
�
�
	�
	rw)r��
__module__�__qualname__�__doc__r}rhr�str�__annotations__ri�ast�AST�tokenize�	TokenInfor�classmethodr	r��argparse�	Namespacer�rr�intrrr��
__classcell__)r�s@rurgrgCs?��������G�G��L�$&���S�	�&�&�&�&(��$�s�)�(�(�(�"
��g�"
��(�,�-�"
��	"
�

�"
�"
�"
�"
�"
�"
�H� 
�� 
�4� 
� 
� 
��[� 
�D�#�H�$6�#�4�#�#�#��[�#�J�Y�u�S�#�s�D��I�%=�>��d�J�K��������rwrg)r�r�r�r�r��typingrrrrr�pyflakes.checker�pyflakes�flake8r�flake8.options.managerr	r��checker�Checkerrgryrwru�<module>r�s���>�>�����
�
�
�
�	�	�	�	���������������������������������������������0�0�0�0�0�0�/��F�/��v�/��f�/���	/�
�v�/��f�
/��v�/�!�&�/�#�F�/�$�V�/�'��/�#�F�/�+�F�/�+�F�/�(��/� .�v�!/�"#�F�#/�/�$)�&�%/�&.�v�'/�(%�f�)/�*%�f�+/�,!�&�-/�.#�F�//�0$�V�1/�2,�V�3/�4�V�5/�6�6�7/�8��9/�:�&�;/�<�v�=/�>��?/�@�6�A/�B��C/�D�F�E/�/�F$�"� �$*�$*�"������!�]/�/�/��d@�@�@�@�@�H�$�,�@�@�@�@�@rw

Hacked By AnonymousFox1.0, Coded By AnonymousFox