@@ -107,7 +107,7 @@ def __setstate__(self, state: Tuple[_BodyType, ApiResponseMeta]) -> None:
107
107
def __len__ (self ) -> int :
108
108
return len (self ._body )
109
109
110
- def __iter__ (self ) -> Iterable [Any ]:
110
+ def __iter__ (self ) -> Iterator [Any ]:
111
111
return iter (self ._body ) # type: ignore[no-any-return]
112
112
113
113
def __str__ (self ) -> str :
@@ -134,7 +134,7 @@ def raw(self) -> _BodyType:
134
134
class TextApiResponse (ApiResponse [str ]):
135
135
"""API responses which are text such as 'text/plain' or 'text/csv'"""
136
136
137
- def __iter__ (self ) -> Iterable [str ]:
137
+ def __iter__ (self ) -> Iterator [str ]:
138
138
return iter (self .body )
139
139
140
140
def __getitem__ (self , item : Union [int , slice ]) -> str :
@@ -148,7 +148,7 @@ def body(self) -> str:
148
148
class BinaryApiResponse (ApiResponse [bytes ]):
149
149
"""API responses which are a binary response such as Mapbox vector tiles"""
150
150
151
- def __iter__ (self ) -> Iterable [int ]:
151
+ def __iter__ (self ) -> Iterator [int ]:
152
152
return iter (self .body )
153
153
154
154
@overload
@@ -214,7 +214,7 @@ def __getitem__(
214
214
) -> Union [_ListItemBodyType , List [_ListItemBodyType ]]:
215
215
return self .body [item ]
216
216
217
- def __iter__ (self ) -> Iterable [_ListItemBodyType ]:
217
+ def __iter__ (self ) -> Iterator [_ListItemBodyType ]:
218
218
return iter (self .body )
219
219
220
220
@property
0 commit comments