Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._vendor.webencodings.mklabels Namespace Reference

Functions

 assert_lower (string)
 
 generate (url)
 

Detailed Description

    webencodings.mklabels
    ~~~~~~~~~~~~~~~~~~~~~

    Regenarate the webencodings.labels module.

    :copyright: Copyright 2012 by Simon Sapin
    :license: BSD, see LICENSE for details.

Function Documentation

◆ assert_lower()

assert_lower (   string)

Definition at line 20 of file mklabels.py.

20def assert_lower(string):
21 assert string == string.lower()
22 return string
23
24
for i

References i.

Referenced by pip._vendor.webencodings.mklabels.generate().

Here is the caller graph for this function:

◆ generate()

generate (   url)

Definition at line 25 of file mklabels.py.

25def generate(url):
26 parts = ['''\
27"""
28
29 webencodings.labels
30 ~~~~~~~~~~~~~~~~~~~
31
32 Map encoding labels to their name.
33
34 :copyright: Copyright 2012 by Simon Sapin
35 :license: BSD, see LICENSE for details.
36
37"""
38
39# XXX Do not edit!
40# This file is automatically generated by mklabels.py
41
42LABELS = {
43''']
44 labels = [
45 (repr(assert_lower(label)).lstrip('u'),
46 repr(encoding['name']).lstrip('u'))
47 for category in json.loads(urlopen(url).read().decode('ascii'))
48 for encoding in category['encodings']
49 for label in encoding['labels']]
50 max_len = max(len(label) for label, name in labels)
52 ' %s:%s %s,\n' % (label, ' ' * (max_len - len(label)), name)
53 for label, name in labels)
54 parts.append('}')
55 return ''.join(parts)
56
57

References pip._vendor.webencodings.mklabels.assert_lower(), pip._vendor.webencodings.mklabels.generate(), and i.

Referenced by pip._vendor.webencodings.mklabels.generate().

Here is the call graph for this function:
Here is the caller graph for this function: