From e5a98d16d80f108e6ee6265d63fe33753577aa09 Mon Sep 17 00:00:00 2001 From: Al Date: Sat, 11 Feb 2017 01:15:07 -0500 Subject: [PATCH] [fix] args --- scripts/geodata/osm/formatter.py | 4 ++-- scripts/geodata/postal_codes/phrases.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/geodata/osm/formatter.py b/scripts/geodata/osm/formatter.py index 82835eb6..17631592 100644 --- a/scripts/geodata/osm/formatter.py +++ b/scripts/geodata/osm/formatter.py @@ -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) diff --git a/scripts/geodata/postal_codes/phrases.py b/scripts/geodata/postal_codes/phrases.py index 1b4e20e8..5b1b95f4 100644 --- a/scripts/geodata/postal_codes/phrases.py +++ b/scripts/geodata/postal_codes/phrases.py @@ -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):