Skip to content

Commit

Permalink
Rewrite so error shows the bad key
Browse files Browse the repository at this point in the history
  • Loading branch information
Famlam authored and frodrigo committed Nov 16, 2023
1 parent 7d59ef8 commit 23e6580
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions plugins/Highway_Lanes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 23e6580

Please sign in to comment.