ó
    áÅŸg  ã                  óì   • S r SSKJr  SSKrSSKrSSKrSSKrSSKJr  SSK	r	SSK	J
r
  SSK	Jr  SSK	Jr  SSK	Jr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  \R.                  " \5      r " S S5      rg)z3Module containing the application logic for Flake8.é    )ÚannotationsN)ÚSequence)Úchecker)Údefaults)Ú
exceptions)Ústyle_guide)ÚBaseFormatter)Údebug)Ú
parse_args)Úfinder)Úreporterc                  óš   • \ rS rSrSrSS jrSS jrSS jrSS jrSS jr	SS jr
SS	 jrSS
 jrSS jrSS jrSS jrSS jrSS jrSrg)ÚApplicationé   z&Abstract our application into a class.c                ó¶   • [         R                   " 5       U l        SU l        SU l        SU l        SU l        SU l        SU l        SU l        SU l	        SU l
        g)zInitialize our application.Nr   F)ÚtimeÚ
start_timeÚend_timeÚpluginsÚ	formatterÚguideÚfile_checker_managerÚoptionsÚresult_countÚtotal_result_countÚcatastrophic_failure©Úselfs    ÚX/var/www/blue/EV-Temp_rev04/venv/lib/python3.13/site-packages/flake8/main/application.pyÚ__init__ÚApplication.__init__   sb   € ô Ÿ)š)›+ˆŒà&*ˆŒà.2ˆŒà/3ˆŒð <@ˆŒ
ð =AˆÔ!ð 37ˆŒð ˆÔð #$ˆÔð %*ˆÕ!ó    c                ó¬   • U R                   (       a  gU R                  c   eU R                  R                  (       a  g[        U R                  S:„  5      $ )zReturn the program exit code.é   r   )r   r   Ú	exit_zeroÚintr   r   s    r   Ú	exit_codeÚApplication.exit_code:   sD   € à×$×$ØØ�|‰|Ñ'Ð'Ð'Ø�<‰<×!×!Øä�t×(Ñ(¨1Ñ,Ó-Ð-r"   c                ó´   • U R                   c   eU R                  c   e[        R                  " U R                   R                  U R                  5      U l        g)z3Initialize a formatter based on the parsed options.N)r   r   r   ÚmakeÚ	reportersr   r   s    r   Úmake_formatterÚApplication.make_formatterD   sB   € à�|‰|Ñ'Ð'Ð'Ø�|‰|Ñ'Ð'Ð'Ü!Ÿš t§|¡|×'=Ñ'=¸t¿|¹|ÓLˆ�r"   c                ó    • U R                   c   eU R                  c   e[        R                  " U R                  U R                   5      U l        g)zInitialize our StyleGuide.N)r   r   r   ÚStyleGuideManagerr   r   s    r   Ú
make_guideÚApplication.make_guideJ   sA   € à�~‰~Ñ)Ð)Ð)Ø�|‰|Ñ'Ð'Ð'Ü ×2Ò2Ø�L‰L˜$Ÿ.™.ó
ˆ�
r"   c                ó²   • U R                   c   eU R                  c   e[        R                  " U R                   U R                  R                  US9U l        g)z#Initialize our FileChecker Manager.N)r   r   Úargv)r   r   r   ÚManagerÚcheckersr   ©r   r3   s     r   Úmake_file_checker_managerÚ%Application.make_file_checker_managerR   sJ   € à�z‰zÑ%Ð%Ð%Ø�|‰|Ñ'Ð'Ð'Ü$+§O¢OØŸ
™
Ø—L‘L×)Ñ)Øñ%
ˆÕ!r"   c                ó¬  • U R                   c   eU R                   R                  5          U R                   R                  5         [        R                  S5        U R                   R                  5         [        R                  " 5       U l        g! [        R                   a0  n[        [        U5      5        [        S5        SU l         SnAN‰SnAff = f)zªRun the actual checks with the FileChecker Manager.

This method encapsulates the logic to make a
:class:`~flake8.checker.Manger` instance run the checks it is
managing.
Nz5Run flake8 with greater verbosity to see more detailsTzFinished running)r   ÚstartÚrunr   ÚPluginExecutionFailedÚprintÚstrr   ÚLOGÚinfoÚstopr   r   )r   Úplugin_faileds     r   Ú
run_checksÚApplication.run_checks\   s¦   € ð ×(Ñ(Ñ4Ð4Ð4à×!Ñ!×'Ñ'Ô)ð	-Ø×%Ñ%×)Ñ)Ô+ô
 	�‰Ð#Ô$Ø×!Ñ!×&Ñ&Ô(ÜŸ	š	›ˆ�øô ×/Ñ/ó 	-Ü”#�mÓ$Ô%ÜÐIÔJØ(,ˆD×%Ñ%ûð	-ús   «B ÂCÂ#&CÃCc                óö  • U R                   c   eU R                   R                  (       d  gU R                  c   eU R                  c   eU R                  U R                  -
  nSU4/nUR
                  n[        R                  S-    HE  nU R                  R                  U   nSU S3nU" Xe45        U S3nU" U[        XQ-  5      45        MG     U R                  c   eU R                  R                  U5        g)z9Aggregate, calculate, and report benchmarks for this run.Nzseconds elapsed)Úfilesztotal z
 processedz processed per second)r   Ú	benchmarkr   r   r   Úappendr   ÚSTATISTIC_NAMESÚ
statisticsr&   r   Úshow_benchmarks)r   Útime_elapsedrJ   Úadd_statisticÚ	statisticÚvalueÚtotal_descriptionÚper_second_descriptions           r   Úreport_benchmarksÚApplication.report_benchmarksp   sü   € à�|‰|Ñ'Ð'Ð'Ø�|‰|×%×%Øà×(Ñ(Ñ4Ð4Ð4Ø�}‰}Ñ(Ð(Ð(Ø—}‘} t§¡Ñ6ˆØ(¨,Ð7Ð8ˆ
Ø"×)Ñ)ˆÜ!×1Ñ1°JÔ>ˆIØ×-Ñ-×8Ñ8¸ÑCˆEØ"(¨¨°:Ð >ÐÙÐ,Ð4Ô5Ø(1 {Ð2GÐ%HÐ"ÙÐ1´3°uÑ7KÓ3LÐMÖNñ ?ð �~‰~Ñ)Ð)Ð)Ø�‰×&Ñ& zÕ2r"   c                óô   • [         R                  S5        U R                  c   eU R                  R                  5       nUu  U l        U l        [         R                  SU R                  U R
                  5        g)z¦Report all the errors found by flake8 3.0.

This also updates the :attr:`result_count` attribute with the total
number of errors, warnings, and other messages found.
zReporting errorsNz.Found a total of %d violations and reported %d)r?   r@   r   Úreportr   r   )r   Úresultss     r   Úreport_errorsÚApplication.report_errors…   sh   € ô 	�‰Ð#Ô$Ø×(Ñ(Ñ4Ð4Ð4Ø×+Ñ+×2Ñ2Ó4ˆØ5<Ñ2ˆÔ Ô!2Ü�‰Ø<Ø×#Ñ#Ø×Ñõ	
r"   c                óô   • U R                   c   eU R                   R                  (       d  gU R                  c   eU R                  c   eU R                  R	                  U R                  R
                  5        g)z.Aggregate and report statistics from this run.N)r   rJ   r   r   Úshow_statisticsÚstatsr   s    r   Úreport_statisticsÚApplication.report_statistics•   s^   € à�|‰|Ñ'Ð'Ð'Ø�|‰|×&×&Øà�~‰~Ñ)Ð)Ð)Ø�z‰zÑ%Ð%Ð%Ø�‰×&Ñ& t§z¡z×'7Ñ'7Õ8r"   c                ó~  • [        U5      u  U l        U l        U R                  R                  (       aY  [        R
                  " [        R                  U R                  5      n[        [        R                  " USSS95        [        S5      eU R                  5         U R                  5         U R                  U5        g)zInitialize the application to be run.

This finds the plugins, registers their options, and parses the
command-line arguments.
é   T)ÚindentÚ	sort_keysr   N)r   r   r   Ú
bug_reportr
   ÚinformationÚflake8Ú__version__r=   ÚjsonÚdumpsÚ
SystemExitr,   r0   r7   )r   r3   r@   s      r   Ú
initializeÚApplication.initializeŸ   sƒ   € ô &0°Ó%5Ñ"ˆŒ�d”là�<‰<×"×"Ü×$Ò$¤V×%7Ñ%7¸¿¹ÓFˆDÜ”$—*’*˜T¨!°tÑ<Ô=Ü˜Q“-Ðà×ÑÔØ�‰ÔØ×&Ñ& tÕ,r"   c                óê   • U R                   c   eU R                   R                  5         U R                  5         U R                  5         U R	                  5         U R                   R                  5         g)z*Report errors, statistics, and benchmarks.N)r   r:   rW   r\   rR   rA   r   s    r   rU   ÚApplication.report°   sV   € à�~‰~Ñ)Ð)Ð)Ø�‰×ÑÔØ×ÑÔØ×ÑÔ Ø×ÑÔ Ø�‰×ÑÕr"   c                óf   • U R                  U5        U R                  5         U R                  5         g )N)ri   rC   rU   r6   s     r   Ú_runÚApplication._run¹   s!   € Ø�‰˜ÔØ�‰ÔØ�‰�r"   c                ó8  •  U R                  U5        U R                  c   eU R                  R                  (       a  [        U R                  5        gg! [
         aF  n[        S5        [        R                  S5        [        R                  U5        SU l	         SnAgSnAf[        R                   a<  n[        S5        [        U5        [        R                  U5        SU l	         SnAgSnAf[        R                   a    SU l	        [        S5         gf = f)zÛRun our application.

This method will also handle KeyboardInterrupt exceptions for the
entirety of the flake8 application. If it sees a KeyboardInterrupt it
will forcibly clean up the :class:`~flake8.checker.Manager`.
Nz... stoppedz#Caught keyboard interrupt from userTz6There was a critical error during execution of Flake8:z"... stopped while processing files)rn   r   Úcountr=   r   ÚKeyboardInterruptr?   ÚcriticalÚ	exceptionr   r   ÚExecutionErrorÚ	EarlyQuit)r   r3   Úexcs      r   r;   ÚApplication.run¾   s×   € ð	)Ø�I‰I�dŒOð —<‘<Ñ+Ð+Ð+Ø�|‰|×!×!Ü�d×'Ñ'Õ(ð "øô !ó 	-Ü�-Ô Ü�L‰LÐ>Ô?Ü�M‰M˜#ÔØ(,ˆD×%Ñ%ûÜ×(Ñ(ó 	-ÜÐJÔKÜ�#ŒJÜ�M‰M˜#ÔØ(,ˆD×%Ñ%ûÜ×#Ñ#ó 	8Ø(,ˆDÔ%ÜÐ6Ö7ð	8ús)   ‚A Á
DÁ<BÂDÂ62C-Ã-)DÄD)
r   r   r   r   r   r   r   r   r   r   N)ÚreturnÚNone)ry   r&   )r3   zSequence[str]ry   rz   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r    r'   r,   r0   r7   rC   rR   rW   r\   ri   rU   rn   r;   Ú__static_attributes__© r"   r   r   r      sG   † Ù0ô*ô<.ôMô
ô
ô$ô(3ô*
ô 9ô-ô"ô÷
)r"   r   )r   Ú
__future__r   Úargparserf   Úloggingr   Útypingr   rd   r   r   r   r   Úflake8.formatting.baser	   Úflake8.mainr
   Úflake8.options.parse_argsr   Úflake8.pluginsr   r   Ú	getLoggerr{   r?   r   r�   r"   r   Ú<module>r‹      sV   ðÙ 9Ý "ã Û Û Û Ý ã Ý Ý Ý Ý Ý 0Ý Ý 0Ý !Ý #ð ×Ò˜Ó!€÷~)ò ~)r"   