Skip to content

Commit 9082470

Browse files
author
Robin Oval
committed
change collections.Sequence
1 parent f285fb6 commit 9082470

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compas/datastructures/mesh/_mesh.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,14 +645,14 @@ def from_vertices_and_faces(cls, vertices, faces):
645645
"""
646646
mesh = cls()
647647

648-
if isinstance(vertices, collections.MutableSequence):
648+
if isinstance(vertices, collections.Sequence):
649649
for x, y, z in iter(vertices):
650650
mesh.add_vertex(x=x, y=y, z=z)
651651
elif isinstance(vertices, collections.Mapping):
652652
for key, xyz in vertices.items():
653653
mesh.add_vertex(key = key, attr_dict = {i: j for i, j in zip(['x', 'y', 'z'], xyz)})
654654

655-
if isinstance(faces, collections.MutableSequence):
655+
if isinstance(faces, collections.Sequence):
656656
for face in iter(faces):
657657
mesh.add_face(face)
658658
elif isinstance(faces, collections.Mapping):

src/compas/datastructures/network/_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def from_vertices_and_edges(cls, vertices, edges):
463463
"""
464464
network = cls()
465465

466-
if isinstance(vertices, collections.MutableSequence):
466+
if isinstance(vertices, collections.Sequence):
467467
for x, y, z in vertices:
468468
network.add_vertex(x=x, y=y, z=z)
469469
elif isinstance(vertices, collections.Mapping):

0 commit comments

Comments
 (0)