From 5f0c858d4bced03ab921c88b71dce2cddccf4e3f Mon Sep 17 00:00:00 2001 From: tolstislon <34726608+tolstislon@users.noreply.github.com> Date: Mon, 26 Aug 2024 11:33:18 +0300 Subject: [PATCH] Updated patterns to libphonenumber v8.13.44 (#121) --- .github/workflows/python-package.yml | 2 +- Pipfile | 2 +- phone_gen/patterns.py | 28 ++++++++++++++++------------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b20c726..71df3ab 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.43 + python -m pip install flake8 pep8-naming pytest black pytest-cov phonenumbers==8.13.44 python -m pip install -e . - name: Flake8 run: | diff --git a/Pipfile b/Pipfile index 40f4d57..a5ba7c7 100644 --- a/Pipfile +++ b/Pipfile @@ -7,7 +7,7 @@ verify_ssl = true black = "==24.8.0" flake8 = "==7.1.1" pep8-naming = "==0.14.1" -phonenumbers = "==8.13.43" +phonenumbers = "==8.13.44" pytest = "==8.3.2" pytest-cov = "==5.0.0" requests = "==2.32.3" diff --git a/phone_gen/patterns.py b/phone_gen/patterns.py index db19622..c3552af 100644 --- a/phone_gen/patterns.py +++ b/phone_gen/patterns.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- """ -Auto-generated file 2024-08-09 14:02:37 UTC (v3) -Resource: https://github.com/google/libphonenumber v8.13.43 +Auto-generated file 2024-08-26 07:38:33 UTC (v3) +Resource: https://github.com/google/libphonenumber v8.13.44 """ PATTERNS = { - "info": "libphonenumber v8.13.43", + "info": "libphonenumber v8.13.44", "data": { "AC": {"code": "247", "pattern": "6[2-467]\\d{3}", "mobile": "4\\d{4}"}, "AD": {"code": "376", "pattern": "[78]\\d{5}", "mobile": "690\\d{6}|[356]\\d{5}"}, @@ -87,7 +87,7 @@ "BF": { "code": "226", "pattern": "2(?:0(?:49|5[23]|6[5-7]|9[016-9])|4(?:4[569]|5[4-6]|6[5-7]|7[0179])|5(?:[34]\\d|50|6[5-7]))\\d{4}", - "mobile": "(?:0[1-35-7]|5[0-8]|[67]\\d)\\d{6}", + "mobile": "(?:0[1-7]|5[0-8]|[67]\\d)\\d{6}", }, "BG": { "code": "359", @@ -170,7 +170,11 @@ "pattern": "8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\d|70[23]|959))\\d{3}", "mobile": "4(?:79[01]|83[0-389]|94[0-4])\\d{5}|4(?:[0-36]\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\d{6}", }, - "CD": {"code": "243", "pattern": "12\\d{7}|[1-6]\\d{6}", "mobile": "88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}"}, + "CD": { + "code": "243", + "pattern": "(?:(?:12|573)\\d\\d|276)\\d{5}|[1-6]\\d{6}", + "mobile": "88\\d{5}|(?:8[0-69]|9[017-9])\\d{7}", + }, "CF": {"code": "236", "pattern": "2[12]\\d{6}", "mobile": "7[024-7]\\d{6}"}, "CG": { "code": "242", @@ -358,7 +362,7 @@ "GM": { "code": "220", "pattern": "(?:4(?:[23]\\d\\d|4(?:1[024679]|[6-9]\\d))|5(?:5(?:3\\d|4[0-7])|6[67]\\d|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}", - "mobile": "(?:[23679]\\d|5[0-489])\\d{5}", + "mobile": "(?:[23679]\\d|4[015]|5[0-489])\\d{5}", }, "GN": { "code": "224", @@ -694,7 +698,7 @@ "NF": {"code": "672", "pattern": "(?:1(?:06|17|28|39)|3[0-2]\\d)\\d{3}", "mobile": "(?:14|3[58])\\d{4}"}, "NG": { "code": "234", - "pattern": "20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])\\d{6}|(?:(?:[1-356]\\d|4[02-8]|8[2-9])\\d|9(?:0[3-9]|[1-9]\\d))\\d{5}|7(?:0(?:[013-689]\\d|2[0-24-9])\\d{3,4}|[1-79]\\d{6})|(?:[12]\\d|4[147]|5[14579]|6[1578]|7[1-3578])\\d{5}", + "pattern": "(?:20(?:[1259]\\d|3[013-9]|4[1-8]|6[024-689]|7[1-79]|8[2-9])|38)\\d{6}", "mobile": "(?:702[0-24-9]|819[01])\\d{6}|(?:7(?:0[13-9]|[12]\\d)|8(?:0[1-9]|1[0-8])|9(?:0[1-9]|1[1-6]))\\d{7}", }, "NI": { @@ -795,7 +799,7 @@ "RO": { "code": "40", "pattern": "[23][13-6]\\d{7}|(?:2(?:19\\d|[3-6]\\d9)|31\\d\\d)\\d\\d", - "mobile": "(?:630|702)0\\d{5}|(?:6(?:[04]0|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", + "mobile": "(?:630|702)0\\d{5}|(?:6(?:00|2\\d)|7(?:0[013-9]|1[0-3]|[2-7]\\d|8[03-8]|9[0-39]))\\d{6}", }, "RS": { "code": "381", @@ -828,7 +832,7 @@ "SG": { "code": "65", "pattern": "662[0-24-9]\\d{4}|6(?:[0-578]\\d|6[013-57-9]|9[0-35-9])\\d{5}", - "mobile": "8(?:09[0-68]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}", + "mobile": "8(?:09[0-689]|95[0-2])\\d{4}|(?:8(?:0[1-8]|[1-8]\\d|9[0-4])|9[0-8]\\d)\\d{5}", }, "SH": {"code": "290", "pattern": "2(?:[0-57-9]\\d|6[4-9])\\d\\d", "mobile": "[56]\\d{4}"}, "SI": { @@ -847,7 +851,7 @@ "SN": { "code": "221", "pattern": "3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}", - "mobile": "7(?:(?:[06-8]\\d|21|90)\\d|5(?:01|[19]0|25|[38]3|[4-7]\\d))\\d{5}", + "mobile": "7(?:(?:[06-8]\\d|21|90)\\d|5(?:0[01]|[19]0|2[25]|[38]3|[4-7]\\d))\\d{5}", }, "SO": { "code": "252", @@ -897,7 +901,7 @@ "TJ": { "code": "992", "pattern": "(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}", - "mobile": "(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:0[0-57-9]|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078]|9\\d)\\d{7}", + "mobile": "(?:33[03-9]|4(?:1[18]|4[02-479])|81[1-9])\\d{6}|(?:[09]\\d|1[017]|2[02]|[34]0|5[05]|7[01578]|8[078])\\d{7}", }, "TK": {"code": "690", "pattern": "(?:2[2-4]|[34]\\d)\\d{2,5}", "mobile": "7[2-4]\\d{2,5}"}, "TL": {"code": "670", "pattern": "(?:2[1-5]|3[1-9]|4[1-4])\\d{5}", "mobile": "7[2-8]\\d{6}"}, @@ -950,7 +954,7 @@ }, "UY": { "code": "598", - "pattern": "(?:1(?:770|9(?:20|87))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", + "pattern": "(?:1(?:770|9(?:20|[89]7))|(?:2\\d|4[2-7])\\d\\d)\\d{4}", "mobile": "9[1-9]\\d{6}", }, "UZ": {