...

Fri, 04 May 2018 21:47:33 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Fri, 04 May 2018 21:47:33 +0300
changeset 101
70d16b5e14ca
parent 100
9b5e6b5e5e0b
child 102
7bac28e53d7c

...

service.py file | annotate | diff | comparison | revisions
--- a/service.py	Fri May 04 21:44:27 2018 +0300
+++ b/service.py	Fri May 04 21:47:33 2018 +0300
@@ -370,7 +370,7 @@
 		return length or len(route)
 	from math import inf
 	def route_limit(route):
-		return (route in night_routes) and 20 or 6
+		return (route in night_routes) and 6 or 20
 	def route_key(route):
 		from math import log
 		return (
@@ -382,7 +382,7 @@
 	def routes_key(routes):
 		return min(route_key(route) for route in routes)
 	result = []
-	rare_variants = {variant['name'] for variant in all_variants if variant['count'] < route_limit(route)}
+	rare_variants = {variant['name'] for variant in all_variants if variant['count'] < route_limit(variant['name'])}
 	rare_variant_groups = set()
 	for regions, routes in sorted(
 		routes_per_destination.items(),

mercurial