Skip to content

Commit 9e90f2c

Browse files
committed
Avoid shadowing .parts() method
1 parent 01fce76 commit 9e90f2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compas/datastructures/assembly/assembly.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __init__(self, name=None, **kwargs):
3434
super(Assembly, self).__init__()
3535
self.attributes = {'name': name or 'Assembly'}
3636
self.graph = Graph()
37-
self.parts = {}
37+
self._parts = {}
3838

3939
def __str__(self):
4040
tpl = "<Assembly with {} parts and {} connections>"
@@ -78,7 +78,7 @@ def add_part(self, part, key=None, **kwargs):
7878
"""
7979
key = self.graph.add_node(key=key, part=part, **kwargs)
8080
part.key = key
81-
self.parts[part.guid] = part
81+
self._parts[part.guid] = part
8282
return key
8383

8484
def add_connection(self, a, b, **kwargs):
@@ -139,4 +139,4 @@ def find(self, guid):
139139
The identified part, if any.
140140
141141
"""
142-
return self.parts.get(guid)
142+
return self._parts.get(guid)

0 commit comments

Comments
 (0)