From 33e7178597f8b005b649bc8afab1646aa38af7db Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Thu, 26 Oct 2017 17:57:58 +0300 Subject: [PATCH] Remove duplicate warnings about duplicate stop_area members, Paris -200 warnings :) --- subway_structure.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/subway_structure.py b/subway_structure.py index 1e1d9fa..d34dddc 100644 --- a/subway_structure.py +++ b/subway_structure.py @@ -415,10 +415,13 @@ class City: self.error('Route in two route_masters', m) self.masters[el_id(m)] = el elif el['tags'].get('public_transport') == 'stop_area': + warned_about_duplicates = False for m in el['members']: stop_area = self.stop_areas[el_id(m)] if el in stop_area: - self.warn('Duplicate element in a stop area', el) + if not warned_about_duplicates: + self.warn('Duplicate element in a stop area', el) + warned_about_duplicates = True else: stop_area.append(el)