|
30 | 30 | # limitations under the License. |
31 | 31 | import re |
32 | 32 |
|
33 | | -from re_util import fullmatch # Extra regexp function; see README |
34 | | -from util import UnicodeMixin |
35 | | -import unicode_util |
| 33 | +from .re_util import fullmatch # Extra regexp function; see README |
| 34 | +from .util import UnicodeMixin |
| 35 | +from .unicode_util import digit as unicode_digit |
36 | 36 |
|
37 | 37 | # Data class definitions |
38 | | -from phonenumber import PhoneNumber, CountryCodeSource |
39 | | -from phonemetadata import NumberFormat, PhoneMetadata |
| 38 | +from .phonenumber import PhoneNumber, CountryCodeSource |
| 39 | +from .phonemetadata import NumberFormat, PhoneMetadata |
40 | 40 |
|
41 | 41 | # Import auto-generated data structures |
42 | 42 | try: |
43 | | - from data import _COUNTRY_CODE_TO_REGION_CODE |
| 43 | + from .data import _COUNTRY_CODE_TO_REGION_CODE |
44 | 44 | except ImportError: # pragma no cover |
45 | 45 | # Before the generated code exists, the data/ directory is empty. |
46 | 46 | # The generation process imports this module, creating a circular |
@@ -485,7 +485,7 @@ def normalize_digits_only(number, keep_non_digits=False): |
485 | 485 | number_length = len(number) |
486 | 486 | normalized_digits = u"" |
487 | 487 | for ii in xrange(number_length): |
488 | | - d = unicode_util.digit(number[ii], -1) |
| 488 | + d = unicode_digit(number[ii], -1) |
489 | 489 | if d != -1: |
490 | 490 | normalized_digits += unicode(d) |
491 | 491 | elif keep_non_digits: |
|
0 commit comments