
    ^h|                         S 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
Jr   " S S\5      r " S	 S
\5      r\ " S S5      5       rg)z 
Summarize Black runs to users.
    )	dataclass)Enum)Path)style)erroutc                        \ rS rSrSrSrSrSrg)Changed   r          N)__name__
__module____qualname____firstlineno__NOCACHEDYES__static_attributes__r       F/home/james-whalen/.local/lib/python3.13/site-packages/black/report.pyr
   r
      s    	
BF
Cr   r
   c                       \ rS rSrSrSrg)NothingChanged   z3Raised when reformatted code is the same as source.r   N)r   r   r   r   __doc__r   r   r   r   r   r      s    =r   r   c                       \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   Sr
\\S'   Sr\\S	'   Sr\\S
'   Sr\\S'   S\S\SS4S jrS\S\SS4S jrS\S\SS4S jr\S\4S j5       rS\4S jrSrg)Report   zDProvides a reformatting counter. Can be rendered with `str(report)`.Fcheckdiffquietverboser   change_count
same_countfailure_countsrcchangedreturnNc                    U[         R                  L an  U R                  (       d  U R                  (       a  SOSnU R                  (       d  U R
                  (       d  [        U SU 35        U =R                  S-  sl        g	U R                  (       a(  U[         R                  L a  U S3nOU S3n[        USS9  U =R                  S-  sl	        g	)
zGIncrement the counter for successful reformatting. Write out a message.zwould reformatreformatted r   z" already well formatted, good job.z( wasn't modified on disk since last run.FboldN)
r
   r   r    r!   r#   r"   r   r$   r   r%   )selfr'   r(   r+   msgs        r   doneReport.done$   s    gkk!.2jjDII*=K||4::{m1SE*+"||gjj( E!CDC E!IJCCe$OOq Or   messagec                 P    [        SU SU 35        U =R                  S-  sl        g)zCIncrement the counter for failed reformatting. Write out a message.zerror: cannot format z: r   N)r   r&   )r/   r'   r3   s      r   failedReport.failed4   s)    #C57)45ar   pathc                 F    U R                   (       a  [        U SU 3SS9  g g )Nz
 ignored: Fr-   )r#   r   )r/   r7   r3   s      r   path_ignoredReport.path_ignored9   s#    <<4&
7),59 r   c                 n    U R                   (       a  gU R                  (       a  U R                  (       a  gg)zReturn the exit code that the app should use.

This considers the current state of changed files and failures:
- if there were any failures, return 123;
- if any files were changed and --check is being used, return 1;
- otherwise return 0.
{   r   r   )r&   r$   r    )r/   s    r   return_codeReport.return_code=   s%     4::r   c           	         U R                   (       d  U R                  (       a  SnSnSnOSnSnSn/ nU R                  (       aJ  U R                  S:  a  SOS	nUR                  [	        U R                   S
U S3SSS9[	        U SS9-   5        U R
                  (       a@  U R
                  S:  a  SOS	nUR                  [	        U R
                   S
U S3SS9U-   5        U R                  (       a?  U R                  S:  a  SOS	nUR                  [	        U R                   S
U SU 3SS95        SR                  U5      S-   $ )zSRender a color report of the current state.

Use `click.unstyle` to remove colors.
zwould be reformattedzwould be left unchangedzwould fail to reformatr+   zleft unchangedzfailed to reformatr   s z filer,   Tblue)r.   fgr-   )rC   redz, .)r    r!   r$   appendr   r%   r&   join)r/   r+   	unchangedr5   reportr@   s         r   __str__Report.__str__P   s/   
 ::0K1I-F'K(I)F((1,"AMM**+515DVL;-t45
 ??*AMM%4??"351 =&IIUV))A-2AMM%4#5#5"6eA3ax HUSTyy 3&&r   r   )r   r   r   r   r   r    bool__annotations__r!   r"   r#   r$   intr%   r&   r   r
   r1   strr5   r9   propertyr=   rJ   r   r   r   r   r   r      s    NE4D$E4GTL#JM3! !w !4 !  $      
: : : : S  $' 'r   r   N)r   dataclassesr   enumr   pathlibr   clickr   black.outputr   r   r
   UserWarningr   r   r   r   r   <module>rW      sO    "    !d >[ > R' R' R'r   