관리-도구
편집 파일: generate_command.cpython-311.pyc
� �܋f6 � �n � d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl mZ erddlm Z dd �Zdd�ZdS )z;Everything related to the 'pylint-config generate' command.� )�annotationsN)�StringIO)� TYPE_CHECKING)�utils)�get_subparser_help)�PyLinter�linterr �return�Nonec �� � t d� � t j � � }|dk ot j � � }t j � � \ }}|dk r| � |�� � }nt � � }t j � � 5 t j dt �� � | � |d�� � |� � � }d d d � � n# 1 swxY w Y |rat |dd � � � 5 }t ||�� � d d d � � n# 1 swxY w Y t d|� � � � �� � d S t |� � d S ) Nz4Starting interactive pylint configuration generation�toml)�minimal�ignore)�category)�Commands)�stream�skipsections�wzutf-8)�encoding)�filezWrote configuration file to )�printr �get_and_validate_format�get_minimal_setting�get_and_validate_output_file�_generate_config_filer �warnings�catch_warnings�filterwarnings�DeprecationWarning�generate_config�getvalue�open�resolve)r �format_typer �to_file�output_file_name� config_string� output_stream�fs �~/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/config/_pylint_config/generate_command.py�generate_interactive_configr+ s� � � � @�A�A�A��/�1�1�K��V�#�C��(A�(C�(C�G� %� B� D� D��G� ��f����4�4�W�4�E�E� � � � � � � � $� &� &� 5� 5��#�H�7I�J�J�J�J��"�"�-�m�"�T�T�T�)�2�2�4�4�M� 5� 5� 5� 5� 5� 5� 5� 5� 5� 5� 5���� 5� 5� 5� 5� � � �"�C�'� :� :� :� )�a��-�a�(�(�(�(� )� )� )� )� )� )� )� )� )� )� )���� )� )� )� )� �I�-=�-E�-E�-G�-G�I�I�J�J�J�J�J� �m�����s% �AC#�#C'�*C'�D � D$�'D$�intc �z � | j j rt | � � dS t t | d� � � � dS )z Handle 'pylint-config generate'.r �generate� )�config�interactiver+ r r )r s r* �handle_generate_commandr2 - sB � � �}� � �#�F�+�+�+��q� � �V�Z� 0� 0�1�1�1� �2� )r r r r )r r r r, )�__doc__� __future__r r �ior �typingr �pylint.config._pylint_configr �)pylint.config._pylint_config.help_messager �pylint.lint.pylinterr r+ r2 � r3 r* �<module>r<