Skip to content

Commit 4bc5243

Browse files
committed
Generated Python files for metadata
1 parent 9054bd2 commit 4bc5243

519 files changed

Lines changed: 2396 additions & 361 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

python/phonenumbers/data/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ def _load_region(code):
2929
for country_code in _AVAILABLE_NONGEO_COUNTRY_CODES:
3030
PhoneMetadata.register_nongeo_region_loader(country_code, _load_region)
3131

32+
from .alt_format_30 import PHONE_ALT_FORMAT_30
33+
from .alt_format_31 import PHONE_ALT_FORMAT_31
3234
from .alt_format_34 import PHONE_ALT_FORMAT_34
3335
from .alt_format_351 import PHONE_ALT_FORMAT_351
3436
from .alt_format_352 import PHONE_ALT_FORMAT_352
@@ -37,17 +39,23 @@ def _load_region(code):
3739
from .alt_format_373 import PHONE_ALT_FORMAT_373
3840
from .alt_format_375 import PHONE_ALT_FORMAT_375
3941
from .alt_format_380 import PHONE_ALT_FORMAT_380
42+
from .alt_format_385 import PHONE_ALT_FORMAT_385
4043
from .alt_format_43 import PHONE_ALT_FORMAT_43
4144
from .alt_format_44 import PHONE_ALT_FORMAT_44
4245
from .alt_format_49 import PHONE_ALT_FORMAT_49
4346
from .alt_format_55 import PHONE_ALT_FORMAT_55
47+
from .alt_format_58 import PHONE_ALT_FORMAT_58
4448
from .alt_format_595 import PHONE_ALT_FORMAT_595
4549
from .alt_format_61 import PHONE_ALT_FORMAT_61
50+
from .alt_format_62 import PHONE_ALT_FORMAT_62
51+
from .alt_format_63 import PHONE_ALT_FORMAT_63
4652
from .alt_format_7 import PHONE_ALT_FORMAT_7
4753
from .alt_format_81 import PHONE_ALT_FORMAT_81
4854
from .alt_format_855 import PHONE_ALT_FORMAT_855
4955
from .alt_format_90 import PHONE_ALT_FORMAT_90
50-
_ALT_NUMBER_FORMATS = {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, 43: PHONE_ALT_FORMAT_43, 44: PHONE_ALT_FORMAT_44, 49: PHONE_ALT_FORMAT_49, 55: PHONE_ALT_FORMAT_55, 595: PHONE_ALT_FORMAT_595, 61: PHONE_ALT_FORMAT_61, 7: PHONE_ALT_FORMAT_7, 81: PHONE_ALT_FORMAT_81, 855: PHONE_ALT_FORMAT_855, 90: PHONE_ALT_FORMAT_90}
56+
from .alt_format_971 import PHONE_ALT_FORMAT_971
57+
from .alt_format_972 import PHONE_ALT_FORMAT_972
58+
_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, 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}
5159

5260
# A mapping from a country code to the region codes which
5361
# denote the country/region represented by that country code.
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. 30 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
4+
PHONE_ALT_FORMAT_30 = [NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{4})', format=u'\\1 \\2 \\3', leading_digits_pattern=['21'])]
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. 31 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
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]'])]
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. 385 metadata"""
2+
from ..phonemetadata import NumberFormat
3+
4+
PHONE_ALT_FORMAT_385 = [NumberFormat(pattern='(1)(\\d{3})(\\d{4})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1']), NumberFormat(pattern='(1)(\\d{3})(\\d{2})(\\d{2})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['1']), NumberFormat(pattern='(6[09])(\\d{3})(\\d{4})', format=u'\\1 \\2 \\3', leading_digits_pattern=['6[09]']), NumberFormat(pattern='(\\d{2})(\\d{2})(\\d{4})', format=u'\\1 \\2 \\3', leading_digits_pattern=['[2-69]'])]
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. 43 metadata"""
22
from ..phonemetadata import NumberFormat
33

4-
PHONE_ALT_FORMAT_43 = [NumberFormat(pattern='(5)(\\d{3,12})', format=u'\\1 \\2', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(50)(\\d{2})(\\d{2})(\\d{2,4})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['50']), NumberFormat(pattern='(5\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2,4})', format=u'\\1 \\2 \\3 \\4 \\5', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(5\\d)(\\d{5})(\\d{4,6})', format=u'\\1 \\2 \\3', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(5\\d)(\\d{6,7})', format=u'\\1 \\2', leading_digits_pattern=['5[079]'])]
4+
PHONE_ALT_FORMAT_43 = [NumberFormat(pattern='(5)(\\d{3,12})', format=u'\\1 \\2', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(50)(\\d{2})(\\d{2})(\\d{2,4})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['50']), NumberFormat(pattern='(5\\d)(\\d{2})(\\d{2})(\\d{2})(\\d{2,4})', format=u'\\1 \\2 \\3 \\4 \\5', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(5\\d)(\\d{5})(\\d{4,6})', format=u'\\1 \\2 \\3', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(5\\d)(\\d{6,7})', format=u'\\1 \\2', leading_digits_pattern=['5[079]']), NumberFormat(pattern='(\\d{3})(\\d{2})(\\d{2})(\\d{2,3})', format=u'\\1 \\2 \\3 \\4', leading_digits_pattern=['316|46|51|732|6(?:44|5[0-3579]|[6-9])|7(?:1|[28]0)|[89]'])]
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. 44 metadata"""
22
from ..phonemetadata import NumberFormat
33

4-
PHONE_ALT_FORMAT_44 = [NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{4})', format=u'\\1-\\2-\\3', leading_digits_pattern=['20']), NumberFormat(pattern='(\\d{4})(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1[2-48][02-9]|7(?:[1-5789]|624)']), NumberFormat(pattern='(\\d{3})(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['7[1-5789]']), NumberFormat(pattern='(80\\d)(\\d{3,4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['80'])]
4+
PHONE_ALT_FORMAT_44 = [NumberFormat(pattern='(\\d{3})(\\d{3})(\\d{4})', format=u'\\1-\\2-\\3', leading_digits_pattern=['20']), NumberFormat(pattern='(\\d{2})(\\d{4})(\\d{2})(\\d{2})', format=u'\\1-\\2-\\3-\\4', leading_digits_pattern=['20']), NumberFormat(pattern='(\\d{4})(\\d{3})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['1[2-48][02-9]|7(?:[1-5789]|624)']), NumberFormat(pattern='(\\d{3})(\\d{4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['7[1-5789]']), NumberFormat(pattern='(80\\d)(\\d{3,4})(\\d{3})', format=u'\\1 \\2 \\3', leading_digits_pattern=['80'])]

0 commit comments

Comments
 (0)