From 824b8881350eae8ee285217a477ef1e8900c3f38 Mon Sep 17 00:00:00 2001 From: tolstislon <34726608+tolstislon@users.noreply.github.com> Date: Tue, 7 Nov 2023 12:28:27 +0300 Subject: [PATCH] Updated patterns to libphonenumber v8.13.24 (#100) --- .github/workflows/python-package.yml | 4 ++-- Pipfile | 2 +- phone_gen/patterns.py | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 309501a..537d516 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -25,7 +25,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pep8-naming pytest black pytest-cov phonenumbers==8.13.22 + python -m pip install flake8 pep8-naming pytest black pytest-cov phonenumbers==8.13.24 python -m pip install -e . - name: Flake8 run: | @@ -35,4 +35,4 @@ jobs: black --check phone_gen - name: Test with pytest run: | - pytest -m "not phonenumbers" tests + pytest tests diff --git a/Pipfile b/Pipfile index a46821f..98049a3 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,7 @@ verify_ssl = true black = "==23.9.1" flake8 = "==6.1.0" pep8-naming = "==0.13.3" -phonenumbers = "==8.13.22" +phonenumbers = "==8.13.24" pytest = "==7.4.2" pytest-cov = "==4.1.0" requests = "==2.31.0" diff --git a/phone_gen/patterns.py b/phone_gen/patterns.py index 2cf2ab9..6c6bc48 100644 --- a/phone_gen/patterns.py +++ b/phone_gen/patterns.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """ -Auto-generated file 2023-10-16 09:29:18 UTC -Resource: https://github.com/google/libphonenumber v8.13.23 +Auto-generated file 2023-11-07 09:22:17 UTC +Resource: https://github.com/google/libphonenumber v8.13.24 """ PATTERNS = { - "info": "libphonenumber v8.13.23", + "info": "libphonenumber v8.13.24", "data": { "AC": { "code": "247", @@ -321,7 +321,7 @@ "EE": { "code": "372", "pattern": "(((3[23589])|(4[3-8])|(6[\\d])|(7[1-9])|(88)[\\d]{5}))", - "mobile": "(((5[\\d]{5})|(8(1(0(000)|([3-9][\\d][\\d]))|((1(0[236])|(1[\\d]))|((2[0-59])|([3-79][\\d])[\\d])[\\d]))|(2(0(000)|((19)|([2-7][\\d])[\\d]))|((([124-6][\\d])|(3[5-9])[\\d])|(7([0-79][\\d])|(8[13-9]))|(8([2-6][\\d])|(7[01]))[\\d]))|([349][\\d]{4}))[\\d][\\d])|(5(([02][\\d])|(5[0-478])[\\d])|(1([0-8][\\d])|(95))|(6(4[0-4])|(5[1-589]))[\\d]{3}))", + "mobile": "(((5[\\d]{5})|(8(1(0(0(00)|([178][\\d]))|([3-9][\\d][\\d]))|((1(0[236])|(1[\\d]))|((2[0-59])|([3-79][\\d])[\\d])[\\d]))|(2(0(000)|((19)|([2-7][\\d])[\\d]))|((([124-6][\\d])|(3[5-9])[\\d])|(7([0-79][\\d])|(8[13-9]))|(8([2-6][\\d])|(7[01]))[\\d]))|([349][\\d]{4}))[\\d][\\d])|(5(([02][\\d])|(5[0-478])[\\d])|(1([0-8][\\d])|(95))|(6(4[0-4])|(5[1-589]))[\\d]{3}))", }, "EG": { "code": "20", @@ -451,7 +451,7 @@ "GT": { "code": "502", "pattern": "(([267][2-9][\\d]{6}))", - "mobile": "(([3-5][\\d]{7}))", + "mobile": "((([3-5][\\d][\\d])|(80[0-4])[\\d]{5}))", }, "GU": { "code": "1", @@ -471,7 +471,7 @@ "HK": { "code": "852", "pattern": "(((2([13-9][\\d])|(2[013-9])[\\d])|(3(([1569][0-24-9])|(4[0-246-9])|(7[0-24-69])[\\d])|(8([45][0-8])|(6[01])|(9[\\d])))|(58(0[1-9])|(1[2-9]))[\\d]{4}))", - "mobile": "(((4(44[5-9])|(6(0[0-7])|(1[0-6])|(4[0-57-9])|(6[0-4])|(7[0-8])))|(573[0-6])|(6(26[013-8])|(66[0-3]))|(70(7[1-5])|(8[0-4]))|(848[015-9])|(9(29[013-9])|(59[0-4]))[\\d]{4})|((4(4[01])|(6[2358]))|(5([1-59][0-46-9])|(6[0-4689])|(7[0-246-9]))|(6(0[1-9])|([13-59][\\d])|([268][0-57-9])|(7[0-79]))|(84[09])|(9(0[1-9])|(1[02-9])|([2358][0-8])|([467][\\d]))[\\d]{5}))", + "mobile": "(((4(44[5-9])|(6(0[0-7])|(1[0-6])|(4[0-57-9])|(6[0-4])))|(573[0-6])|(6(26[013-8])|(66[0-3]))|(70(7[1-5])|(8[0-4]))|(848[0-25-9])|(9(29[013-9])|(59[0-4]))[\\d]{4})|((4(4[01])|(6[23578]))|(5([1-59][0-46-9])|(6[0-4689])|(7[0-246-9]))|(6(0[1-9])|([13-59][\\d])|([268][0-57-9])|(7[0-79]))|(84[09])|(9(0[1-9])|(1[02-9])|([2358][0-8])|([467][\\d]))[\\d]{5}))", }, "HN": { "code": "504", @@ -753,7 +753,7 @@ "MU": { "code": "230", "pattern": "(((2([0346-8][\\d])|(1[0-7]))|(4([013568][\\d])|(2[4-8]))|(54([3-5][\\d])|(71))|(6[\\d][\\d])|(8(14)|(3[129]))[\\d]{4}))", - "mobile": "((5(4(2[1-389])|(7[1-9]))|(87[15-8])[\\d]{4})|((5(2[5-9])|(4[3-689])|([57][\\d])|(8[0-689])|(9[0-8]))|(7(0[0-2])|(3[013]))[\\d]{5}))", + "mobile": "((5(4(2[1-389])|(7[1-9]))|(87[15-8])[\\d]{4})|((5(2[5-9])|(4[3-689])|([57][\\d])|(8[0-689])|(9[0-8]))|(7(0[0-3])|(3[013]))[\\d]{5}))", }, "MV": { "code": "960", @@ -847,7 +847,7 @@ }, "PA": { "code": "507", - "pattern": "(((1(0[\\d])|(1[479])|(2[37])|(3[0137])|(4[17])|(5[05])|(6[58])|(7[0167])|(8[2358])|(9[1389]))|(2([0235-79][\\d])|(1[0-7])|(4[013-9])|(8[02-9]))|(3([089][\\d])|(1[0-7])|(2[0-5])|(33)|(4[0-79])|(5[0-35])|(6[068])|(7[0-8]))|(4(00)|(3[0-579])|(4[\\d])|(7[0-57-9]))|(5([01][\\d])|(2[0-7])|([56]0)|(79))|(7(0[09])|(2[0-26-8])|(3[03])|(4[04])|(5[05-9])|(6[056])|(7[0-24-9])|(8[5-9])|(90))|(8(09)|(2[89])|(3[\\d])|(4[0-24-689])|(5[014])|(8[02]))|(9(0[5-9])|(1[0135-8])|(2[036-9])|(3[35-79])|(40)|(5[0457-9])|(6[05-9])|(7[04-9])|(8[35-8])|(9[\\d]))[\\d]{4}))", + "pattern": "(((1(0[\\d])|(1[479])|(2[37])|(3[0137])|(4[17])|(5[05])|(6[058])|(7[0167])|(8[2358])|(9[1389]))|(2([0235-79][\\d])|(1[0-7])|(4[013-9])|(8[02-9]))|(3([089][\\d])|(1[0-7])|(2[0-5])|(33)|(4[0-79])|(5[0-35])|(6[068])|(7[0-8]))|(4(00)|(3[0-579])|(4[\\d])|(7[0-57-9]))|(5([01][\\d])|(2[0-7])|([56]0)|(79))|(7(0[09])|(2[0-26-8])|(3[03])|(4[04])|(5[05-9])|(6[0156])|(7[0-24-9])|(8[5-9])|(90))|(8(09)|(2[89])|(3[\\d])|(4[0-24-689])|(5[014])|(8[02]))|(9(0[5-9])|(1[0135-8])|(2[036-9])|(3[35-79])|(40)|(5[0457-9])|(6[05-9])|(7[04-9])|(8[35-8])|(9[\\d]))[\\d]{4}))", "mobile": "(((1[16]1)|(21[89])|(6[\\d]{3})|(8(1[01])|(7[23]))[\\d]{4}))", }, "PE": { @@ -1129,12 +1129,12 @@ "UG": { "code": "256", "pattern": "((20((240)|(30[67])[\\d])|(6(00[0-2])|(30[0-4]))[\\d]{3})|((20([017][\\d])|(2[5-9])|(32)|(5[0-4])|(6[15-9]))|([34][\\d]{3})[\\d]{5}))", - "mobile": "((726[01][\\d]{5})|(7([01578][\\d])|(20)|(36)|(4[0-4])|(6[0-6])|(9[89])[\\d]{6}))", + "mobile": "((726[01][\\d]{5})|(7([015-8][\\d])|(20)|(36)|(4[0-4])|(9[89])[\\d]{6}))", }, "US": { "code": "1", - "pattern": "((5056([0-35-9][\\d])|(4[46])[\\d]{4})|((4722)|(505[2-57-9])|(983[29])[\\d]{6})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[0-2])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[179])|(6[1-47])|(7[0-5])|(8[0256]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[01679])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[068])|(3[0-2589])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01357-9])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))", - "mobile": "((5056([0-35-9][\\d])|(4[46])[\\d]{4})|((4722)|(505[2-57-9])|(983[29])[\\d]{6})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[0-2])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[179])|(6[1-47])|(7[0-5])|(8[0256]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[01679])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[068])|(3[0-2589])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01357-9])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))", + "pattern": "((5056([0-35-9][\\d])|(4[468])[\\d]{4})|((4722)|(505[2-57-9])|(983[29])[\\d]{6})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[0-2])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[179])|(6[1-47])|(7[0-5])|(8[0256]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[01679])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[068])|(3[0-2589])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01357-9])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))", + "mobile": "((5056([0-35-9][\\d])|(4[468])[\\d]{4})|((4722)|(505[2-57-9])|(983[29])[\\d]{6})|((2(0[1-35-9])|(1[02-9])|(2[03-589])|(3[149])|(4[08])|(5[1-46])|(6[0279])|(7[0269])|(8[13]))|(3(0[1-57-9])|(1[02-9])|(2[01356])|(3[0-24679])|(4[167])|(5[0-2])|(6[014])|(8[056]))|(4(0[124-9])|(1[02-579])|(2[3-5])|(3[0245])|(4[023578])|(58)|(6[349])|(7[0589])|(8[04]))|(5(0[1-47-9])|(1[0235-8])|(20)|(3[0149])|(4[01])|(5[179])|(6[1-47])|(7[0-5])|(8[0256]))|(6(0[1-35-9])|(1[024-9])|(2[03689])|([34][016])|(5[01679])|(6[0-279])|(78)|(8[0-29]))|(7(0[1-46-8])|(1[2-9])|(2[04-7])|(3[1247])|(4[037])|(5[47])|(6[02359])|(7[0-59])|(8[156]))|(8(0[1-68])|(1[02-8])|(2[068])|(3[0-2589])|(4[03578])|(5[046-9])|(6[02-5])|(7[028]))|(9(0[1346-9])|(1[02-9])|(2[0589])|(3[0146-8])|(4[01357-9])|(5[12469])|(7[0-389])|(8[04-69]))[2-9][\\d]{6}))", }, "UY": { "code": "598", @@ -1143,8 +1143,8 @@ }, "UZ": { "code": "998", - "pattern": "(((55[\\d][\\d])|(6(1(22)|(3[124])|(4[1-4])|(5[1-3578])|(64))|(2(22)|(3[0-57-9])|(41))|(5(22)|(3[3-7])|(5[024-8]))|(6[\\d][\\d])|(7([23][\\d])|(7[69]))|(9(22)|(4[1-8])|(6[135])))|(7(0(5[4-9])|(6[0146])|(7[124-6])|(9[135-8]))|((1[12])|(8[\\d])[\\d])|(2(22)|(3[13-57-9])|(4[1-3579])|(5[14]))|(3(2[\\d])|(3[1578])|(4[1-35-7])|(5[1-57])|(61))|(4(2[\\d])|(3[1-579])|(7[1-79]))|(5(22)|(5[1-9])|(6[1457]))|(6(22)|(3[12457])|(4[13-8]))|(9(22)|(5[1-9])))[\\d]{5}))", - "mobile": "((((200[01])|((33)|(50)|(88)|(9[0-57-9])[\\d][\\d])[\\d])|(6(1(2(2[01])|(98))|(35[0-4])|(50[\\d])|(61[23])|(7([01][017])|(4[\\d])|(55)|(9[5-9])))|(2((11)|(7[\\d])[\\d])|(2([12]1)|(9[01379]))|(5([126][\\d])|(3[0-4])))|(5(19[01])|(2(27)|(9[26]))|((30)|(59)|(7[\\d])[\\d]))|(6(2(1[5-9])|(2[0367])|(38)|(41)|(52)|(60))|((3[79])|(9[0-3])[\\d])|(4(56)|(83))|(7([07][\\d])|(1[017])|(3[07])|(4[047])|(5[057])|(67)|(8[0178])|(9[79])))|(7(2(24)|(3[237])|(4[5-9])|(7[15-8]))|(5(7[12])|(8[0589]))|(7(0[\\d])|([39][07]))|(9(0[\\d])|(7[079])))|(9(2(1[1267])|(3[01])|(5[\\d])|(7[0-4]))|((5[67])|(7[\\d])[\\d])|(6(2[0-26])|(8[\\d]))))|(7([07][\\d]{3})|(1(13[01])|(6(0[47])|(1[67])|(66))|(71[3-69])|(98[\\d]))|(2(2(2[79])|(95))|(3(2[5-9])|(6[0-6]))|(57[\\d])|(7(0[\\d])|(1[17])|(2[27])|(3[37])|(44)|(5[057])|(66)|(88)))|(3(2(1[0-6])|(21)|(3[469])|(7[159]))|((33)|(9[4-6])[\\d])|(5(0[0-4])|(5[579])|(9[\\d]))|(7([0-3579][\\d])|(4[0467])|(6[67])|(8[078])))|(4(2(29)|(5[0257])|(6[0-7])|(7[1-57]))|(5(1[0-4])|(8[\\d])|(9[5-9]))|(7(0[\\d])|(1[024589])|(2[0-27])|(3[0137])|([46][07])|(5[01])|(7[5-9])|(9[079]))|(9(7[015-9])|([89][\\d])))|(5(112)|(2(0[\\d])|(2[29])|([49]4))|(3[1568][\\d])|(52[6-9])|(7(0[01578])|(1[017])|([23]7)|(4[047])|([5-7][\\d])|(8[78])|(9[079])))|(6(2(2[1245])|(4[2-4]))|(39[\\d])|(41[179])|(5([349][\\d])|(5[0-2]))|(7(0[017])|([13][\\d])|(22)|(44)|(55)|(67)|(88)))|(9(22[128])|(3(2[0-4])|(7[\\d]))|(57[02569])|(7(2[05-9])|(3[37])|(4[\\d])|(60)|(7[2579])|(87)|(9[07]))))[\\d]{4}))", + "pattern": "(((55[\\d][\\d])|(6(1(22)|(3[124])|(4[1-4])|(5[1-3578])|(64))|(2(22)|(3[0-57-9])|(41))|(5(22)|(3[3-7])|(5[024-8]))|(6[\\d][\\d])|(7([23][\\d])|(7[69]))|(9(22)|(4[1-8])|(6[135])))|(7(0(5[4-9])|(6[0146])|(7[124-6])|(9[135-8]))|((1[12])|([68][\\d])[\\d])|(2(22)|(3[13-57-9])|(4[1-3579])|(5[14]))|(3(2[\\d])|(3[1578])|(4[1-35-7])|(5[1-57])|(61))|(4(2[\\d])|(3[1-579])|(7[1-79]))|(5(22)|(5[1-9])|(6[1457]))|(9(22)|(5[1-9])))[\\d]{5}))", + "mobile": "(((([25]0)|(33)|(88)|(9[0-57-9])[\\d]{3})|(6(1(2(2[01])|(98))|(35[0-4])|(50[\\d])|(61[23])|(7([01][017])|(4[\\d])|(55)|(9[5-9])))|(2((11)|(7[\\d])[\\d])|(2([12]1)|(9[01379]))|(5([126][\\d])|(3[0-4])))|(5(19[01])|(2(27)|(9[26]))|((30)|(59)|(7[\\d])[\\d]))|(6(2(1[5-9])|(2[0367])|(38)|(41)|(52)|(60))|((3[79])|(9[0-3])[\\d])|(4(56)|(83))|(7([07][\\d])|(1[017])|(3[07])|(4[047])|(5[057])|(67)|(8[0178])|(9[79])))|(7(2(24)|(3[237])|(4[5-9])|(7[15-8]))|(5(7[12])|(8[0589]))|(7(0[\\d])|([39][07]))|(9(0[\\d])|(7[079])))|(9(2(1[1267])|(3[01])|(5[\\d])|(7[0-4]))|((5[67])|(7[\\d])[\\d])|(6(2[0-26])|(8[\\d]))))|(7([07][\\d]{3})|(1(13[01])|(6(0[47])|(1[67])|(66))|(71[3-69])|(98[\\d]))|(2(2(2[79])|(95))|(3(2[5-9])|(6[0-6]))|(57[\\d])|(7(0[\\d])|(1[17])|(2[27])|(3[37])|(44)|(5[057])|(66)|(88)))|(3(2(1[0-6])|(21)|(3[469])|(7[159]))|((33)|(9[4-6])[\\d])|(5(0[0-4])|(5[579])|(9[\\d]))|(7([0-3579][\\d])|(4[0467])|(6[67])|(8[078])))|(4(2(29)|(5[0257])|(6[0-7])|(7[1-57]))|(5(1[0-4])|(8[\\d])|(9[5-9]))|(7(0[\\d])|(1[024589])|(2[0-27])|(3[0137])|([46][07])|(5[01])|(7[5-9])|(9[079]))|(9(7[015-9])|([89][\\d])))|(5(112)|(2(0[\\d])|(2[29])|([49]4))|(3[1568][\\d])|(52[6-9])|(7(0[01578])|(1[017])|([23]7)|(4[047])|([5-7][\\d])|(8[78])|(9[079])))|(9(22[128])|(3(2[0-4])|(7[\\d]))|(57[02569])|(7(2[05-9])|(3[37])|(4[\\d])|(60)|(7[2579])|(87)|(9[07]))))[\\d]{4}))", }, "VA": { "code": "39",