00I3 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 ZdedefdZdS )zModule 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 ddfdZedefd Z de
dee
fdZdS ) 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_guidestats_statsselfr s c/builddir/build/BUILD/cloudlinux-venv-1.0.10/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_countr s r total_errorszReport.total_errors3 s --r violationc J d | j | D S )zGet 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_codemessage).0ss r