[fix] args

This commit is contained in:
Al
2017-02-11 01:15:07 -05:00
parent 01c4c8ec82
commit e5a98d16d8
2 changed files with 4 additions and 4 deletions

View File

@@ -1100,7 +1100,7 @@ class OSMAddressFormatter(object):
expanded_postal_codes = []
if postal_code:
expanded_postal_codes = self.expand_postal_codes(postal_code, osm_components, country, all_local_languages | random_languages)
expanded_postal_codes = self.expand_postal_codes(postal_code, country, all_local_languages | random_languages, osm_components)
if len(expanded_postal_codes) == 1:
revised_tags[AddressFormatter.POSTCODE] = expanded_postal_codes[0]
@@ -1130,7 +1130,7 @@ class OSMAddressFormatter(object):
if k not in revised_tags and k in (AddressFormatter.HOUSE_NUMBER, AddressFormatter.ROAD):
revised_tags[k] = v
elif k not in revised_tags and k == AddressFormatter.POSTCODE:
expanded_postal_codes = self.expand_postal_codes(v, osm_components, country, all_local_languages | random_languages)
expanded_postal_codes = self.expand_postal_codes(v, country, all_local_languages | random_languages, osm_components)
if not expanded_postal_codes:
revised_tags.pop(AddressFormatter.POSTCODE)

View File

@@ -25,8 +25,8 @@ class PostalCodes(object):
return postal_codes_config.get_property('validate_postcode', country=country, default=False)
@classmethod
def should_strip_components(cls, country_code):
return postal_codes_config.get_property('strip_components', country=country_code)
def should_strip_components(cls, country):
return postal_codes_config.get_property('strip_components', country=country)
@classmethod
def add_country_code(cls, postal_code, country):