Skip to content

Commit dc313e5

Browse files
committed
Generated shelf files rather than Python files
1 parent d237a82 commit dc313e5

12 files changed

Lines changed: 36 additions & 220974 deletions

File tree

python/phonenumbers/carrierdata/__init__.py

Lines changed: 6 additions & 16572 deletions
Large diffs are not rendered by default.
1.61 MB
Binary file not shown.

python/phonenumbers/geodata/__init__.py

Lines changed: 6 additions & 202366 deletions
Large diffs are not rendered by default.
38.7 MB
Binary file not shown.

python/phonenumbers/tzdata/__init__.py

Lines changed: 6 additions & 1971 deletions
Large diffs are not rendered by default.
204 KB
Binary file not shown.
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
"""Per-prefix data, mapping each prefix to a dict of locale:name.
2-
3-
Auto-generated file, do not edit by hand.
4-
"""
5-
from phonenumbers.util import u
6-
71
# Copyright (C) 2011-2014 The Libphonenumber Authors
82
#
93
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,13 +12,10 @@
1812
# See the License for the specific language governing permissions and
1913
# limitations under the License.
2014

21-
CARRIER_DATA = {
22-
'1650212':{'en': 'US carrier'},
23-
'1650213':{'en': 'US carrier2'},
24-
'244262':{'en': 'Angolan fixed line carrier'},
25-
'244917':{'en': 'Angolan carrier'},
26-
'4411':{'en': 'British fixed line carrier'},
27-
'4473':{'en': 'British carrier', 'sv': u('Brittisk operat\u00f6r')},
28-
'44760':{'en': 'British pager'},
29-
}
15+
import os
16+
import shelve
17+
from phonenumbers.util import u
18+
19+
_DIR, _ = os.path.split(__file__)
3020
CARRIER_LONGEST_PREFIX = 7
21+
CARRIER_DATA = shelve.open(os.path.join(_DIR, "carrierdata"), "r")
16 KB
Binary file not shown.
Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
"""Per-prefix data, mapping each prefix to a dict of locale:name.
2-
3-
Auto-generated file, do not edit by hand.
4-
"""
5-
from phonenumbers.util import u
6-
71
# Copyright (C) 2011-2014 The Libphonenumber Authors
82
#
93
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,30 +12,10 @@
1812
# See the License for the specific language governing permissions and
1913
# limitations under the License.
2014

21-
GEOCODE_DATA = {
22-
'1201':{'de': 'New Jersey', 'en': 'NJ'},
23-
'1212':{'en': 'NY'},
24-
'1212812':{'en': 'New York, NY'},
25-
'1617423':{'en': 'Boston, MA'},
26-
'1650':{'de': 'Kalifornien', 'en': 'CA'},
27-
'1650960':{'en': 'Mountain View, CA'},
28-
'1989':{'en': 'MA'},
29-
'542214':{'en': 'La Plata'},
30-
'822':{'en': 'Seoul', 'ko': u('\uc11c\uc6b8')},
31-
'8231':{'en': 'Gyeonggi', 'ko': u('\uacbd\uae30')},
32-
'8232':{'en': 'Incheon', 'ko': u('\uc778\ucc9c')},
33-
'8233':{'en': 'Gangwon', 'ko': u('\uac15\uc6d0')},
34-
'8241':{'en': 'Chungnam', 'ko': u('\ucda9\ub0a8')},
35-
'8242':{'en': 'Daejeon', 'ko': u('\ub300\uc804')},
36-
'8243':{'en': 'Chungbuk', 'ko': u('\ucda9\ubd81')},
37-
'8251':{'en': 'Busan', 'ko': u('\ubd80\uc0b0')},
38-
'8252':{'en': 'Ulsan', 'ko': u('\uc6b8\uc0b0')},
39-
'8253':{'en': 'Daegu', 'ko': u('\ub300\uad6c')},
40-
'8254':{'en': 'Gyeongbuk', 'ko': u('\uacbd\ubd81')},
41-
'8255':{'en': 'Gyeongnam', 'ko': u('\uacbd\ub0a8')},
42-
'8261':{'en': 'Jeonnam', 'ko': u('\uc804\ub0a8')},
43-
'8262':{'en': 'Gwangju', 'ko': u('\uad11\uc8fc')},
44-
'8263':{'en': 'Jeonbuk', 'ko': u('\uc804\ubd81')},
45-
'8264':{'en': 'Jeju'},
46-
}
15+
import os
16+
import shelve
17+
from phonenumbers.util import u
18+
19+
_DIR, _ = os.path.split(__file__)
4720
GEOCODE_LONGEST_PREFIX = 7
21+
GEOCODE_DATA = shelve.open(os.path.join(_DIR, "geodata"), "r")
16 KB
Binary file not shown.

0 commit comments

Comments
 (0)