Skip to content

Commit 0336e19

Browse files
committed
Generated Python files for metadata
1 parent 8ef7974 commit 0336e19

34 files changed

Lines changed: 314 additions & 176 deletions

python/phonenumbers/carrierdata/__init__.py

Lines changed: 193 additions & 126 deletions
Large diffs are not rendered by default.

python/phonenumbers/data/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ def _load_region(code):
3232
from .alt_format_30 import PHONE_ALT_FORMAT_30
3333
from .alt_format_31 import PHONE_ALT_FORMAT_31
3434
from .alt_format_34 import PHONE_ALT_FORMAT_34
35+
from .alt_format_350 import PHONE_ALT_FORMAT_350
3536
from .alt_format_351 import PHONE_ALT_FORMAT_351
3637
from .alt_format_352 import PHONE_ALT_FORMAT_352
38+
from .alt_format_358 import PHONE_ALT_FORMAT_358
3739
from .alt_format_359 import PHONE_ALT_FORMAT_359
40+
from .alt_format_36 import PHONE_ALT_FORMAT_36
3841
from .alt_format_372 import PHONE_ALT_FORMAT_372
3942
from .alt_format_373 import PHONE_ALT_FORMAT_373
4043
from .alt_format_375 import PHONE_ALT_FORMAT_375
@@ -49,14 +52,18 @@ def _load_region(code):
4952
from .alt_format_61 import PHONE_ALT_FORMAT_61
5053
from .alt_format_62 import PHONE_ALT_FORMAT_62
5154
from .alt_format_63 import PHONE_ALT_FORMAT_63
55+
from .alt_format_66 import PHONE_ALT_FORMAT_66
5256
from .alt_format_675 import PHONE_ALT_FORMAT_675
5357
from .alt_format_7 import PHONE_ALT_FORMAT_7
5458
from .alt_format_81 import PHONE_ALT_FORMAT_81
59+
from .alt_format_84 import PHONE_ALT_FORMAT_84
5560
from .alt_format_855 import PHONE_ALT_FORMAT_855
5661
from .alt_format_90 import PHONE_ALT_FORMAT_90
62+
from .alt_format_94 import PHONE_ALT_FORMAT_94
5763
from .alt_format_971 import PHONE_ALT_FORMAT_971
5864
from .alt_format_972 import PHONE_ALT_FORMAT_972
59-
_ALT_NUMBER_FORMATS = {30: PHONE_ALT_FORMAT_30, 31: PHONE_ALT_FORMAT_31, 34: PHONE_ALT_FORMAT_34, 351: PHONE_ALT_FORMAT_351, 352: PHONE_ALT_FORMAT_352, 359: PHONE_ALT_FORMAT_359, 372: PHONE_ALT_FORMAT_372, 373: PHONE_ALT_FORMAT_373, 375: PHONE_ALT_FORMAT_375, 380: PHONE_ALT_FORMAT_380, 385: PHONE_ALT_FORMAT_385, 43: PHONE_ALT_FORMAT_43, 44: PHONE_ALT_FORMAT_44, 49: PHONE_ALT_FORMAT_49, 55: PHONE_ALT_FORMAT_55, 58: PHONE_ALT_FORMAT_58, 595: PHONE_ALT_FORMAT_595, 61: PHONE_ALT_FORMAT_61, 62: PHONE_ALT_FORMAT_62, 63: PHONE_ALT_FORMAT_63, 675: PHONE_ALT_FORMAT_675, 7: PHONE_ALT_FORMAT_7, 81: PHONE_ALT_FORMAT_81, 855: PHONE_ALT_FORMAT_855, 90: PHONE_ALT_FORMAT_90, 971: PHONE_ALT_FORMAT_971, 972: PHONE_ALT_FORMAT_972}
65+
from .alt_format_995 import PHONE_ALT_FORMAT_995
66+
_ALT_NUMBER_FORMATS = {30: PHONE_ALT_FORMAT_30, 31: PHONE_ALT_FORMAT_31, 34: PHONE_ALT_FORMAT_34, 350: PHONE_ALT_FORMAT_350, 351: PHONE_ALT_FORMAT_351, 352: PHONE_ALT_FORMAT_352, 358: PHONE_ALT_FORMAT_358, 359: PHONE_ALT_FORMAT_359, 36: PHONE_ALT_FORMAT_36, 372: PHONE_ALT_FORMAT_372, 373: PHONE_ALT_FORMAT_373, 375: PHONE_ALT_FORMAT_375, 380: PHONE_ALT_FORMAT_380, 385: PHONE_ALT_FORMAT_385, 43: PHONE_ALT_FORMAT_43, 44: PHONE_ALT_FORMAT_44, 49: PHONE_ALT_FORMAT_49, 55: PHONE_ALT_FORMAT_55, 58: PHONE_ALT_FORMAT_58, 595: PHONE_ALT_FORMAT_595, 61: PHONE_ALT_FORMAT_61, 62: PHONE_ALT_FORMAT_62, 63: PHONE_ALT_FORMAT_63, 66: PHONE_ALT_FORMAT_66, 675: PHONE_ALT_FORMAT_675, 7: PHONE_ALT_FORMAT_7, 81: PHONE_ALT_FORMAT_81, 84: PHONE_ALT_FORMAT_84, 855: PHONE_ALT_FORMAT_855, 90: PHONE_ALT_FORMAT_90, 94: PHONE_ALT_FORMAT_94, 971: PHONE_ALT_FORMAT_971, 972: PHONE_ALT_FORMAT_972, 995: PHONE_ALT_FORMAT_995}
6067

6168
# A mapping from a country code to the region codes which
6269
# denote the country/region represented by that country code.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Auto-generated file, do not edit by hand. 31 metadata"""
22
from ..phonemetadata import NumberFormat
33

4-
PHONE_ALT_FORMAT_31 = [NumberFormat(pattern='([1-578]\\d)(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]'])]
4+
PHONE_ALT_FORMAT_31 = [NumberFormat(pattern='([1-578]\\d)(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]']), NumberFormat(pattern='([1-5]\\d{2})(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['1[16-8]|2[259]|3[124]|4[17-9]|5[124679]'])]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Auto-generated file, do not edit by hand. 350 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
4+
PHONE_ALT_FORMAT_350 = [NumberFormat(pattern='(\\d{4})(\\d{4})', format=u'\\1 \\2', leading_digits_pattern=['2'])]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Auto-generated file, do not edit by hand. 358 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
4+
PHONE_ALT_FORMAT_358 = [NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{3,4})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[14]|2[09]|50|7[135]']), NumberFormat(pattern='(\\d)(\\d{3})(\\d{3,4})', format=u'\\1 \\2', leading_digits_pattern=['[25689][1-8]|3'])]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Auto-generated file, do not edit by hand. 359 metadata"""
22
from ..phonemetadata import NumberFormat
33

4-
PHONE_ALT_FORMAT_359 = [NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['48|8[7-9]|9[08]'])]
4+
PHONE_ALT_FORMAT_359 = [NumberFormat(pattern='(\\d)(\\d{3})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['2']), NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['48|8[7-9]|9[08]']), NumberFormat(pattern='(\\d{3})(\\d{2})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['48|8[7-9]|9[08]'])]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Auto-generated file, do not edit by hand. 36 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
4+
PHONE_ALT_FORMAT_36 = [NumberFormat(pattern='(1)(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1']), NumberFormat(pattern='(\\d{2})(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[2-9]'])]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Auto-generated file, do not edit by hand. 372 metadata"""
22
from ..phonemetadata import NumberFormat
33

4-
PHONE_ALT_FORMAT_372 = [NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[69]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]']), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{2})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[69]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]'])]
4+
PHONE_ALT_FORMAT_372 = [NumberFormat(pattern='(\\d)(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['6']), NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[69]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]']), NumberFormat(pattern='(\\d{2})(\\d{3})(\\d{2})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[69]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]'])]

0 commit comments

Comments
 (0)