§
|<ˆj‚ ã óò — 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 úc/builddir/build/BUILD/cloudlinux-venv-1.0.12/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 ú