Revert PR #18 as incorrect: there may be lines with the same ref in a network
This commit is contained in:
parent
7072494bbd
commit
fd27851c0b
1 changed files with 0 additions and 15 deletions
|
@ -1,5 +1,4 @@
|
|||
import csv
|
||||
import itertools
|
||||
import logging
|
||||
import math
|
||||
import urllib.parse
|
||||
|
@ -1716,18 +1715,6 @@ class City:
|
|||
if t not in have_return:
|
||||
self.notice('Route does not have a return direction', rel)
|
||||
|
||||
def validate_route_refs(self):
|
||||
master_refs = sorted(m.ref for m in self.routes.values())
|
||||
for ref, group in itertools.groupby(master_refs):
|
||||
if len(list(group)) > 1:
|
||||
# This can occur if some routes with some ref belong to
|
||||
# a route_master, but other with the same ref doesn't.
|
||||
self.error("Route masters {} have the same ref".format(
|
||||
', '.join(
|
||||
m.id for m in self.routes.values() if m.ref == ref
|
||||
)
|
||||
))
|
||||
|
||||
def validate_lines(self):
|
||||
self.found_light_lines = len(
|
||||
[x for x in self.routes.values() if x.mode != 'subway']
|
||||
|
@ -1794,8 +1781,6 @@ class City:
|
|||
self.count_unused_entrances()
|
||||
self.found_interchanges = len(self.transfers)
|
||||
|
||||
self.validate_route_refs()
|
||||
|
||||
if self.overground:
|
||||
self.validate_overground_lines()
|
||||
else:
|
||||
|
|
Loading…
Add table
Reference in a new issue