diff --git a/server/lib/python/cartodb_services/cartodb_services/here/geocoder.py b/server/lib/python/cartodb_services/cartodb_services/here/geocoder.py index 79a0ca2..5fd83f1 100644 --- a/server/lib/python/cartodb_services/cartodb_services/here/geocoder.py +++ b/server/lib/python/cartodb_services/cartodb_services/here/geocoder.py @@ -31,7 +31,7 @@ class HereMapsGeocoder(Traceable): 'searchtext', 'state', 'street' - ] + ] ADMITTED_PARAMS = [ 'additionaldata', @@ -51,7 +51,7 @@ class HereMapsGeocoder(Traceable): 'politicalview', 'prox', 'strictlanguagemode' - ] + ADDRESS_PARAMS + ] + ADDRESS_PARAMS PRECISION_BY_MATCH_TYPE = { 'pointAddress': PRECISION_PRECISE, @@ -173,7 +173,7 @@ class HereMapsGeocoderV7(Traceable): 'searchtext', 'state', 'street' - ] + ] QUALIFIED_PARAMS = [ 'state', @@ -183,7 +183,7 @@ class HereMapsGeocoderV7(Traceable): 'postalcode', 'housenumber', 'street' - ] + ] PRECISION_BY_MATCH_TYPE = { 'PA': PRECISION_PRECISE, diff --git a/server/lib/python/cartodb_services/cartodb_services/here/routing.py b/server/lib/python/cartodb_services/cartodb_services/here/routing.py index cdc535e..2b72ff9 100644 --- a/server/lib/python/cartodb_services/cartodb_services/here/routing.py +++ b/server/lib/python/cartodb_services/cartodb_services/here/routing.py @@ -57,7 +57,7 @@ class HereMapsRoutingIsoline(Traceable): def __calculate_isolines(self, source, mode, data_range, range_type, options=None): - options = [] if options is None else options + options = options or [] parsed_options = self.__parse_options(options) source_param = self.__parse_source_param(source, parsed_options) mode_param = self.__parse_mode_param(mode, parsed_options) @@ -196,18 +196,18 @@ class HereMapsRoutingIsolineV8(Traceable): return self.API_VERSION def calculate_isodistance(self, source, mode, data_range, options=None): - options = [] if options is None else options + options = options or [] return self.__calculate_isolines(source, mode, data_range, 'distance', options) def calculate_isochrone(self, source, mode, data_range, options=None): - options = [] if options is None else options + options = options or [] return self.__calculate_isolines(source, mode, data_range, 'time', options) def __calculate_isolines(self, source, mode, data_range, range_type, options=None): - options = [] if options is None else options + options = options or [] parsed_options = self.__parse_options(options) source_param = self.__parse_source_param(source, parsed_options) mode_params = self.__get_mode_params(mode, parsed_options)