관리-도구
편집 파일: mklabels.cpython-38.opt-1.pyc
U ��.e � @ sf d Z ddlZzddlmZ 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 | S �N� )�stringr r �E/usr/lib/python3.8/site-packages/pip/_vendor/webencodings/mklabels.py�assert_lower s r c sf dg}dd� t �t| ��� �d��D �}tdd� |D ��� |�� fdd�|D �� |�d� d �|�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|���d�t |d ��d�f�qqqS )Z encodings�labels�u�name)�reprr �lstrip)�.0�category�encoding�labelr r r � <listcomp>, s ��zgenerate.<locals>.<listcomp>�asciic s s | ]\}}t |�V qd S r ��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, � Nr r �Zmax_lenr r r 3 s ��}� ) �json�loadsr �read�decode�max�extend�append�join)Zurl�partsr r r r �generate s �� r$ �__main__z.http://encoding.spec.whatwg.org/encodings.json) �__doc__r Zurllibr �ImportErrorZurllib.requestr r$ �__name__�printr r r r �<module> s !