Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/flake8/options/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/flake8/options/__pycache__/config.cpython-311.pyc

�

�܋f���T�dZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	l
mZeje��Zd
ede
eeffd�Zd
ede	efd�Zdd�de	edeedede
ejeffd�Zdedejdedeeeffd�ZdS)z!Config handling logic for Flake8.�N)�Any)�Dict)�List)�Optional)�Tuple)�
exceptions)�
OptionManager�s�returnc�F�tj|��}|j|jfS)N)�os�stat�st_ino�st_dev)r
�sts  �f/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/options/config.py�	_stat_keyrs��	�����B�
�9�b�i����pathc�p�tj�d��}	|dkrt|��nd}n#t$rd}YnwxYwt|��}	dD]�}tj��}tj�||��}	|�|d���d|vsd|vr|cS�Z#tt
j
f$r&}t�d||��Yd}~��d}~wwxYwtj�
|��}t|��}	|	|ks|	|krn|}|	}��dS)	N�~T)z	setup.cfgztox.iniz.flake8�UTF-8��encoding�flake8zflake8:local-pluginsz"ignoring unparseable config %s: %s)r
r�
expanduserr�OSError�configparser�RawConfigParser�join�read�UnicodeDecodeError�ParsingError�LOG�warning�dirname)
r�home�	home_stat�dir_stat�	candidate�cfg�cfg_path�e�new_path�new_dir_stats
          r�_find_config_filer0s���
�7���c�"�"�D��'+�s�{�{�I�d�O�O�O��	�	�������	�	�	���������H�$�<�
	$�
	$�I��.�0�0�C��w�|�|�D�)�4�4�H�
$�����G��4�4�4�
�s�?�?�&<��&C�&C�#�O�O�O�'D��	'��(A�B�
O�
O�
O����@�(�A�N�N�N�N�N�N�N�N�����
O�����7�?�?�4�(�(�� ��*�*���8�#�#�|�y�'@�'@���D�#�H�'$�,�4s'�9�A�A�B7�7C3�
C.�.C3F)�isolated�config�extrar1c��tj�d��}|rtj��|fS|�t|��}tj��}|�N|�|d���stjd|�����tj�	|��}n|}|D]}|�|d����||fS)a@Load the configuration given the user options.

    - in ``isolated`` mode, return an empty configuration
    - if a config file is given in ``config`` use that, otherwise attempt to
      discover a configuration using ``tox.ini`` / ``setup.cfg`` / ``.flake8``
    - finally, load any ``extra`` configuration files
    �.Nrrz*The specified config file does not exist: )
r
r�abspathrrr0r!r�ExecutionErrorr&)r2r3r1�pwdr+�cfg_dir�filenames       r�load_configr;9s���
�'�/�/�#�
�
�C��3��+�-�-�s�2�2�
�~�"�3�'�'��
�
&�
(�
(�C�
���x�x���x�1�1�	��+�E�V�E�E���
��'�/�/�&�)�)������-�-������G��,�,�,�,���<�r�option_managerr+r9c���d|vriSi}|dD]�}|j�|��}|�t�d|���:|jt
us|jdkr|�d|��}n6|jdvr|�d|��}n|�d|��}t�d||��|�	||��}|j
�J�|||j
<��|S)z4Parse and normalize the typed configuration options.rNz(Option "%s" is not registered. Ignoring.�count>�
store_true�store_falsezOption "%s" returned value: %r)�config_options_dict�getr$�debug�type�int�action�getint�
getboolean�	normalize�config_name)r<r+r9�config_dict�option_name�option�value�final_values        r�parse_configrP`s���s����	��K��8�}�6�6���3�7�7��D�D���>��I�I�@�+�N�N�N���;�#�����'�!9�!9��J�J�x��5�5�E�E�
�]�;�
;�
;��N�N�8�[�9�9�E�E��G�G�H�k�2�2�E��	�	�2�K��G�G�G��&�&�u�g�6�6���!�-�-�-�*5��F�&�'�'��r)�__doc__r�logging�os.pathr
�typingrrrrrrr�flake8.options.managerr	�	getLogger�__name__r$�strrErr0�boolrr;rP�rr�<module>r[s���'�'�������������������������������������������������0�0�0�0�0�0��g���!�!�� �� ��s�C�x�� � � � ��C��H�S�M�����L�	$�$�$��S�M�$���9�$��	$�
�<�'��,�-�$�$�$�$�N �!� �	�	%� �� �
�#�s�(�^�	 � � � � � r

Hacked By AnonymousFox1.0, Coded By AnonymousFox