From 23e6580e930c1992ff14de3f6bc67d29a5e48eef Mon Sep 17 00:00:00 2001 From: Famlam Date: Sun, 12 Nov 2023 18:18:35 +0100 Subject: [PATCH] Rewrite so error shows the bad key --- plugins/Highway_Lanes.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/Highway_Lanes.py b/plugins/Highway_Lanes.py index e72718e9e..3a70b8d54 100644 --- a/plugins/Highway_Lanes.py +++ b/plugins/Highway_Lanes.py @@ -239,12 +239,10 @@ def way(self, data, tags, nds): stars = list(set(stars)) for star in stars: - l = star + ':lanes' in tags_lanes - lf = star + ':lanes:forward' in tags_lanes - lb = star + ':lanes:backward' in tags_lanes - l2 = star + ':lanes:both_ways' in tags_lanes - if l and (lf or lb or l2): - err.append({"class": 31603, "subclass": 0 + stablehash64(star), "text": {"en": star + ":lanes:*"}}) + if star + ':lanes' in tags_lanes: + for direction in [':forward', ':backward', ':both_ways']: + if star + ':lanes' + direction in tags_lanes: + err.append({"class": 31603, "subclass": stablehash64(star + "|" + direction), "text": {"en": "`{0}` + `{1}`".format(star + ":lanes", star + ":lanes" + direction)}}) if err != []: return err