diff --git a/examples/stops_for_location.py b/examples/stops_for_location.py index dbd53eb..ea9b153 100644 --- a/examples/stops_for_location.py +++ b/examples/stops_for_location.py @@ -4,7 +4,7 @@ from onebusaway import OnebusawaySDK -# Load settings from .en`v file, if it exists. If not, we'll use the +# Load settings from .env file, if it exists. If not, we'll use the # Puget Sound server URL (which is also the default in the SDK) and # the 'TEST' API key. settings = load_settings( @@ -27,8 +27,8 @@ # make it easy to look up routes by ID. reference_map = {} -for route in references.routes: - reference_map[route.id] = route +for ref_route in references.routes: + reference_map[ref_route.id] = ref_route for stop in stops: print(f"{stop.name} ({stop.lat}, {stop.lon})") @@ -39,7 +39,7 @@ route: Any = reference_map[route_id] # Get a string that looks like "D Line - Blue Ridge/Crown Hill - Ballard - Downtown Seattle" - description = [route.null_safe_short_name, route.description] - description = [e for e in description if e] - description = " - ".join(description) - print(f" {description}") + description_list = [route.null_safe_short_name, route.description] + description_list = [e for e in description_list if e] + description_str = " - ".join(description_list) + print(f" {description_str}")