� =��g| ���dZddlmZddlmZddlmZddlmZddl m Z m Z Gd�de��Z Gd �d e ��ZeGd �d ����Zd S)z Summarize Black runs to users. �)� dataclass)�Enum)�Path)�style)�err�outc��eZdZdZdZdZdS)�Changedr��N)�__name__� __module__� __qualname__�NO�CACHED�YES���\/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/black/report.pyr r s������ �B� �F� �C�C�Crr c��eZdZdZdS)�NothingChangedz3Raised when reformatted code is the same as source.N)r rr�__doc__rrrrrs������=�=�=�=rrc���eZdZUdZdZeed<dZeed<dZeed<dZ eed<dZ e ed<dZ e ed <dZ e ed <d ed ed dfd�Zd eded dfd�Zdeded dfd�Zed e fd���Zd efd�ZdS)�ReportzDProvides a reformatting counter. Can be rendered with `str(report)`.F�check�diff�quiet�verboser� change_count� same_count� failure_count�src�changed�returnNc�0�|tjurF|js|jrdnd}|js|jst |�d|����|xjdz c_d S|jr*|tjur|�d�}n|�d�}t |d���|xj dz c_ d S) zGIncrement the counter for successful reformatting. Write out a message.zwould reformat� reformatted� r z" already well formatted, good job.z( wasn't modified on disk since last run.F��boldN) r rrrrrrrrr )�selfr"r#r&�msgs r�donez Report.done$s��� �g�k� !� !�.2�j�X�D�I�X�*�*�=�K��|� ,�4�:� ,��{�*�*�S�*�*�+�+�+� � � �� "� � � � ��|� %��g�j�(�(� �D�D�D�C�C� �J�J�J�C��C�e�$�$�$�$� �O�O�q� �O�O�O�Or�messagec�P�td|�d|����|xjdz c_dS)zCIncrement the counter for failed reformatting. Write out a message.zerror: cannot format z: r N)rr!)r*r"r-s r�failedz Report.failed4s;�� � 4�C� 4� 4�7� 4� 4�5�5�5� ���a�����r�pathc�D�|jrt|�d|��d���dSdS)Nz ignored: Fr()rr)r*r0r-s r� path_ignoredzReport.path_ignored9s=�� �<� :� �4�,�,�7�,�,�5� 9� 9� 9� 9� 9� 9� :� :rc�8�|jrdS|jr |jrdSdS)aReturn 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!rr)r*s r� return_codezReport.return_code=s2�� � � ��3� � � �4�:� ��1��qrc �<�|js|jrd}d}d}nd}d}d}g}|jrR|jdkrdnd }|�t |j�d |�d �d d ���t |�d ���z��|jrA|jdkrdnd }|�t |j�d |�d �d ���|z��|jr@|jdkrdnd }|�t |j�d |�d |��d�����d�|��dzS)zcRender a color report of the current state. Use `click.unstyle` to remove colors. zwould be reformattedzwould be left unchangedzwould fail to reformatr&zleft unchangedzfailed to reformatr �s�z filer'T�blue)r)�fgr()r:�redz, �.)rrr�appendrr r!�join)r*r&� unchangedr/�reportr7s r�__str__zReport.__str__Ps{�� �:� *��� *�0�K�1�I�-�F�F�'�K�(�I�)�F��� � � ��(�1�,�,���"�A� �M�M���*�5�5��5�5�5�D�V�L�L�L��;�(�t�4�4�4�5� � � � �?� W����*�*����A� �M�M�%�4�?� =� =�� =� =� =�&�I�I�I�I�U� V� V� V� � � U��)�A�-�-���2�A� �M�M�%�4�#5� H� H�A� H� H�� H� H�U�S�S�S� T� T� T��y�y�� � �3�&�&r)r rrrr�bool�__annotations__rrrr�intr r!rr r,�strr/r2�propertyr5rArrrrrsI�������N�N��E�4�����D�$�����E�4�����G�T�����L�#�����J������M�3����!��!�w�!�4�!�!�!�!�  �$� �� �� � � � � :��:��:��:�:�:�:���S�����X��$'��'�'�'�'�'�'rrN)r� dataclassesr�enumr�pathlibr�clickr� black.outputrrr � UserWarningrrrrr�<module>rMs ����"�!�!�!�!�!�������������������!�!�!�!�!�!�!�!� � � � � �d� � � � >�>�>�>�>�[�>�>�>� �R'�R'�R'�R'�R'�R'�R'� ��R'�R'�R'r
Memory