4
4
import logging
5
5
import urllib .request
6
6
from collections .abc import Iterable
7
- from collections .abc import Sequence
8
7
from datetime import datetime
9
8
from enum import Enum
10
9
from typing import Any
@@ -105,7 +104,7 @@ def get_messages(
105
104
messages to display for multiple routes.
106
105
107
106
Arguments:
108
- route_tags: (Sequence of Strings) List of NextBus route tags for the routes to get
107
+ route_tags: (Iterable of Strings) List of NextBus route tags for the routes to get
109
108
messages for.
110
109
agency: (String) Name of a transit agency on NextBus. This must be provided if the
111
110
"agency" instance attribute has not been set.
@@ -122,7 +121,7 @@ def get_messages(
122
121
"""
123
122
124
123
if not isinstance (route_tags , Iterable ) or isinstance (route_tags , str ):
125
- raise TypeError ('"route_tags" must be a Sequence but not a single string.' )
124
+ raise TypeError ('"route_tags" must be a Iterable but not a single string.' )
126
125
127
126
agency = self ._get_agency (agency )
128
127
@@ -234,7 +233,7 @@ def get_predictions_for_multi_stops(
234
233
arrival time predictions for multiple stops.
235
234
236
235
Arguments:
237
- route_stops: (Sequence of RouteStops) Sequence of tuples identifying the combinations of
236
+ route_stops: (Iterable of RouteStops) Iterable of tuples identifying the combinations of
238
237
routes and stops to get predictions for.
239
238
agency: (String) Name of a transit agency on NextBus. This must be provided if the
240
239
"agency" instance attribute has not been set.
@@ -250,7 +249,7 @@ def get_predictions_for_multi_stops(
250
249
valid JSON.
251
250
"""
252
251
253
- if not isinstance (route_stops , Sequence ) or isinstance (route_stops , str ):
252
+ if not isinstance (route_stops , Iterable ) or isinstance (route_stops , str ):
254
253
raise TypeError ('"route_stops" must be a sequence.' )
255
254
256
255
agency = self ._get_agency (agency )
0 commit comments