Open yodalee opened 6 years ago
src/dictionary/gen_zip_code_seed.py contains the following code:
src/dictionary/gen_zip_code_seed.py
level3 = re.sub(u'(.*)', u'', level3, re.U)
But the 4th argument to re.sub() is supposed to be maximum number of substitutions, not flags.
re.sub()
NB, the re.U flag affects only semantics of \w, \W, \b, \B, \d, \D, \s and \S, so it wouldn't have any effect on this regular expression.
re.U
\w
\W
\b
\B
\d
\D
\s
\S
This bug was found using pydiatra.
src/dictionary/gen_zip_code_seed.py
contains the following code:But the 4th argument to
re.sub()
is supposed to be maximum number of substitutions, not flags.NB, the
re.U
flag affects only semantics of\w
,\W
,\b
,\B
,\d
,\D
,\s
and\S
, so it wouldn't have any effect on this regular expression.This bug was found using pydiatra.