관리-도구
편집 파일: mklabels.cpython-36.pyc
3 �Re � @ sf d Z ddlZyddlmZ W n ek r< ddlmZ Y nX dd� Zdd� Zedkrbe ed �� dS ) z� webencodings.mklabels ~~~~~~~~~~~~~~~~~~~~~ Regenarate the webencodings.labels module. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. � N)�urlopenc C s | | j � kst�| S )N)�lower�AssertionError)�string� r ��/builddir/build/BUILDROOT/alt-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/webencodings/mklabels.py�assert_lower s r c sf dg}dd� t jt| �j� jd��D �}tdd� |D ��� |j� fdd�|D �� |jd� d j|�S ) Na """ webencodings.labels ~~~~~~~~~~~~~~~~~~~ Map encoding labels to their name. :copyright: Copyright 2012 by Simon Sapin :license: BSD, see LICENSE for details. """ # XXX Do not edit! # This file is automatically generated by mklabels.py LABELS = { c S sL g | ]D}|d D ]6}|d D ](}t t|��jd�t |d �jd�f�qqqS )� encodings�labels�u�name)�reprr �lstrip)�.0�category�encoding�labelr r r � <listcomp>- s zgenerate.<locals>.<listcomp>�asciic s s | ]\}}t |�V qd S )N)�len)r r r r r r � <genexpr>2 s zgenerate.<locals>.<genexpr>c 3 s, | ]$\}}d |d� t |� |f V qdS )z %s:%s %s, � N)r )r r r )�max_lenr r r 4 s �}� ) �json�loadsr �read�decode�max�extend�append�join)�url�partsr r )r r �generate s r% �__main__z.http://encoding.spec.whatwg.org/encodings.json) �__doc__r �urllibr �ImportError�urllib.requestr r% �__name__�printr r r r �<module> s !