Skip to content

Commit 60ae841

Browse files
committed
change Iterator to Sequence
1 parent 7ecc6a7 commit 60ae841

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

py5_resources/py5_module/py5/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import warnings
3232
from io import BytesIO
3333
from pathlib import Path
34-
from typing import Any, Callable, Iterator, Union, overload # noqa
34+
from typing import Any, Callable, Sequence, Union, overload # noqa
3535

3636
import jpype.imports # noqa
3737
import numpy as np # noqa

py5_resources/py5_module/py5/graphics.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import functools
2424
import types
2525
import weakref
26-
from typing import Iterator, overload # noqa
26+
from typing import Sequence, overload # noqa
2727

2828
import numpy as np # noqa
2929
import numpy.typing as npt # noqa
@@ -138,37 +138,37 @@ def __exit__(self, *exc):
138138

139139
# *** BEGIN METHODS ***
140140

141-
def points(self, coordinates: Iterator[Iterator[float]], /) -> None:
141+
def points(self, coordinates: Sequence[Sequence[float]], /) -> None:
142142
"""$class_Py5Graphics_points"""
143143
if isinstance(coordinates, types.GeneratorType):
144144
coordinates = list(coordinates)
145145
_Py5GraphicsHelper.points(self._instance, coordinates)
146146

147-
def lines(self, coordinates: Iterator[Iterator[float]], /) -> None:
147+
def lines(self, coordinates: Sequence[Sequence[float]], /) -> None:
148148
"""$class_Py5Graphics_lines"""
149149
if isinstance(coordinates, types.GeneratorType):
150150
coordinates = list(coordinates)
151151
_Py5GraphicsHelper.lines(self._instance, coordinates)
152152

153-
def vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
153+
def vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
154154
"""$class_Py5Graphics_vertices"""
155155
if isinstance(coordinates, types.GeneratorType):
156156
coordinates = list(coordinates)
157157
_Py5GraphicsHelper.vertices(self._instance, coordinates)
158158

159-
def bezier_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
159+
def bezier_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
160160
"""$class_Py5Graphics_bezier_vertices"""
161161
if isinstance(coordinates, types.GeneratorType):
162162
coordinates = list(coordinates)
163163
_Py5GraphicsHelper.bezierVertices(self._instance, coordinates)
164164

165-
def curve_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
165+
def curve_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
166166
"""$class_Py5Graphics_curve_vertices"""
167167
if isinstance(coordinates, types.GeneratorType):
168168
coordinates = list(coordinates)
169169
_Py5GraphicsHelper.curveVertices(self._instance, coordinates)
170170

171-
def quadratic_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
171+
def quadratic_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
172172
"""$class_Py5Graphics_quadratic_vertices"""
173173
if isinstance(coordinates, types.GeneratorType):
174174
coordinates = list(coordinates)

py5_resources/py5_module/py5/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import functools
2424
import weakref
25-
from typing import Iterator, Union, overload # noqa
25+
from typing import Sequence, Union, overload # noqa
2626

2727
from . import spelling
2828
from .base import Py5Base

py5_resources/py5_module/py5/shader.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import functools
2424
import weakref
25-
from typing import Any, Iterator, overload # noqa
25+
from typing import Any, Sequence, overload # noqa
2626

2727
import numpy as np # noqa
2828
import numpy.typing as npt # noqa

py5_resources/py5_module/py5/shape.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import types
2525
import weakref
2626
from pathlib import Path
27-
from typing import Iterator, overload # noqa
27+
from typing import Sequence, overload # noqa
2828

2929
import numpy as np
3030
import numpy.typing as npt # noqa
@@ -164,37 +164,37 @@ def _get_depth(self) -> float: # @decorator
164164

165165
depth: float = property(fget=_get_depth, doc="""$class_Py5Shape_depth""")
166166

167-
def set_strokes(self, strokes: Iterator[int], /) -> None:
167+
def set_strokes(self, strokes: Sequence[int], /) -> None:
168168
"""$class_Py5Shape_set_strokes"""
169169
if isinstance(strokes, types.GeneratorType):
170170
strokes = list(strokes)
171171
_Py5ShapeHelper.setStrokes(self._instance, strokes)
172172

173-
def set_fills(self, fills: Iterator[int], /) -> None:
173+
def set_fills(self, fills: Sequence[int], /) -> None:
174174
"""$class_Py5Shape_set_fills"""
175175
if isinstance(fills, types.GeneratorType):
176176
fills = list(fills)
177177
_Py5ShapeHelper.setFills(self._instance, fills)
178178

179-
def vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
179+
def vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
180180
"""$class_Py5Shape_vertices"""
181181
if isinstance(coordinates, types.GeneratorType):
182182
coordinates = list(coordinates)
183183
_Py5ShapeHelper.vertices(self._instance, coordinates)
184184

185-
def bezier_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
185+
def bezier_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
186186
"""$class_Py5Shape_bezier_vertices"""
187187
if isinstance(coordinates, types.GeneratorType):
188188
coordinates = list(coordinates)
189189
_Py5ShapeHelper.bezierVertices(self._instance, coordinates)
190190

191-
def curve_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
191+
def curve_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
192192
"""$class_Py5Shape_curve_vertices"""
193193
if isinstance(coordinates, types.GeneratorType):
194194
coordinates = list(coordinates)
195195
_Py5ShapeHelper.curveVertices(self._instance, coordinates)
196196

197-
def quadratic_vertices(self, coordinates: Iterator[Iterator[float]], /) -> None:
197+
def quadratic_vertices(self, coordinates: Sequence[Sequence[float]], /) -> None:
198198
"""$class_Py5Shape_quadratic_vertices"""
199199
if isinstance(coordinates, types.GeneratorType):
200200
coordinates = list(coordinates)

py5_resources/py5_module/py5/sketch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import warnings
3232
from io import BytesIO
3333
from pathlib import Path
34-
from typing import Any, Callable, Iterator, Union, overload # noqa
34+
from typing import Any, Callable, Sequence, Union, overload # noqa
3535

3636
import jpype
3737
import numpy as np

0 commit comments

Comments
 (0)