From 734dd4025c691f6affdfb902f88500ae82f8ebff Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 12 Nov 2021 12:17:59 +0000 Subject: [PATCH] Make skip_tags global. --- matcher/api.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/matcher/api.py b/matcher/api.py index 8841d1c..e4f5245 100644 --- a/matcher/api.py +++ b/matcher/api.py @@ -26,6 +26,17 @@ tag_prefixes = { "historic", } +# these tags are too generic, so we ignore them +skip_tags = { + "Key:addr", + "Key:addr:street", + "Key:lit", + "Key:image", + "Key:name", + "Key:symbol", + "Key:brand", +} + def get_country_iso3166_1(lat, lon): point = func.ST_SetSRID(func.ST_MakePoint(lon, lat), srid) alpha2_codes = set() @@ -254,17 +265,6 @@ def get_items(item_ids): def get_item_tags(item): - skip_tags = { - "Key:addr", - "Key:addr:street", - "Key:lit", - "Key:image", - "Key:name", - "Key:symbol", - "Key:brand", - } - - isa_items = [] isa_list = [v["numeric-id"] for v in item.get_isa()] isa_items = [(isa, []) for isa in get_items(isa_list)]