AlkantarClanX12
Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/flake8/api/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/flake8/api/__pycache__/legacy.cpython-311.pyc |
� �܋f� � �� � d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddl Z ddlmZ ddl mZ dd lmZ dd lmZ ej e� � ZdZ G d� d � � Z G d� d� � Zdedefd�ZdS )z�Module containing shims around Flake8 2.x behaviour. Previously, users would import :func:`get_style_guide` from ``flake8.engine``. In 3.0 we no longer have an "engine" module but we maintain the API from it. � N)�Any)�List)�Optional)�Type)�expand_paths)�base)�application)�config)�get_style_guidec �d � e Zd ZdZdej ddfd�Zedefd�� � Z de dee fd�ZdS ) �Reporta" Public facing object that mimic's Flake8 2.0's API. .. note:: There are important changes in how this object behaves compared to the object provided in Flake8 2.x. .. warning:: This should not be instantiated by users. .. versionchanged:: 3.0.0 r �returnNc �` � |j �J �|| _ |j | _ | j j | _ dS )zlInitialize the Report for the user. .. warning:: This should not be instantiated by users. N)�guide�_application�_style_guide�stats�_stats��selfr s �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/flake8/api/legacy.py�__init__zReport.__init__) s7 � � � �,�,�,�'���'�-����'�-����� c � � | j j S )z"Return the total number of errors.)r �result_count�r s r �total_errorszReport.total_errors3 s � � � �-�-r � violationc �J � d� | j � |� � D � � S )z�Get the list of occurrences of a violation. :returns: List of occurrences of a violation formatted as: {Count} {Error Code} {Message}, e.g., ``8 E531 Some error message about the error`` c �@ � g | ]}|j � d |j � d |j � ���S )� )�count� error_code�message)�.0�ss r � <listcomp>z)Report.get_statistics.<locals>.<listcomp>@ sD � � � � �� �w�3�3���3�3�� �3�3� � � r )r �statistics_for)r r s r �get_statisticszReport.get_statistics8 s3 � � � ��[�/�/� �:�:� � � � r ) �__name__� __module__�__qualname__�__doc__�app�Applicationr �property�intr �strr r) � r r r r s� � � � � � �� �.�C�O� .�� .� .� .� .� �.�c� .� .� .� �X�.� �� ��S� � � � � � � r r c �D � e Zd ZdZdej ddfd�Zedej fd�� � Z edee fd�� � Z ddeee defd �Zdd edee defd�Z dd eeej ddfd�Z dd edee dee dee def d�ZdS )� StyleGuideaD Public facing object that mimic's Flake8 2.0's StyleGuide. .. note:: There are important changes in how this object behaves compared to the StyleGuide object provided in Flake8 2.x. .. warning:: This object should not be instantiated directly by users. .. versionchanged:: 3.0.0 r r Nc �, � || _ |j | _ dS )zInitialize our StyleGuide.N)r �file_checker_manager�_file_checker_managerr s r r zStyleGuide.__init__U s � �'���%0�%E��"�"�"r c �6 � | j j �J �| j j S )zuReturn application's options. An instance of :class:`argparse.Namespace` containing parsed options. )r �optionsr s r r: zStyleGuide.optionsZ s"