Skip to content

Commit 437d403

Browse files
committed
Drop embedded Unicode flag in sub-regexp
All the places that use _DIGIT_SEQUENCE independently set re.UNICODE and embedded flags cause warnings on Python 3.6. Fixes daviddrysdale#102.
1 parent a7ec745 commit 437d403

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python/phonenumbers/phonenumbermatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def _limit(lower, upper):
9999
# A punctuation sequence allowing white space.
100100
_PUNCTUATION = u("[") + _VALID_PUNCTUATION + u("]") + _PUNCTUATION_LIMIT
101101
# A digits block without punctuation.
102-
_DIGIT_SEQUENCE = u("(?u)\\d") + _limit(1, _DIGIT_BLOCK_LIMIT)
102+
_DIGIT_SEQUENCE = u("\\d") + _limit(1, _DIGIT_BLOCK_LIMIT)
103103
# Punctuation that may be at the start of a phone number - brackets and plus signs.
104104
_LEAD_CLASS_CHARS = _OPENING_PARENS + _PLUS_CHARS
105105
_LEAD_CLASS = u("[") + _LEAD_CLASS_CHARS + u("]")

0 commit comments

Comments
 (0)