관리-도구
편집 파일: filesize.cpython-312.pyc
� G��e� � � � d Z dgZddlmZmZmZmZ ddd�dedee d ed ee dee defd �Z dedee d edeeef fd�Z ddd�ded ee dee defd�Zy)a� Functions for reporting filesizes. Borrowed from https://github.com/PyFilesystem/pyfilesystem2 The functions declared in this module should cover the different use cases needed to generate a string representation of a file size using several different units. Since there are many standards regarding file size units, three different functions have been implemented. See Also: * `Wikipedia: Binary prefix <https://en.wikipedia.org/wiki/Binary_prefix>`_ �decimal� )�Iterable�List�Optional�Tuple� � �� precision� separator�size�suffixes�baser r �returnc � � | dk( ry| |k rdj | � S t |d� D ] \ }}||z }| |k s� n dj || z z ||�� S )Nr z1 bytez {:,} bytes� z{:,.{precision}f}{separator}{}r )�format� enumerate)r r r r r �i�suffix�units ��/builddir/build/BUILDROOT/alt-python312-pip-23.3.1-1.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/pip/_vendor/rich/filesize.py�_to_strr s� � � �q�y�� ����"�"�4�(�(��x��+� � ��6��Q�w���$�;��� ,�2�2� ���t� ���� 3� � � c �T � t |� D ] \ }}||z }| ||z k s� ||fS fS )z*Pick a suffix and base for the given size.)r )r r r r r r s r �pick_unit_and_suffixr , sH � ��x�(� � ��6��Q�w���$��+�����<�� � ��<�r c �"