Skip to content

Commit cc0f2a2

Browse files
author
L'In20Cible
committed
Made Entity.parent's setter private to avoid confusion when reading the code (can't directly use the dynamic method for a property due to how wrap_entity_mem_func and dynamic data are handled).
1 parent ea0b35b commit cc0f2a2

File tree

1 file changed

+2
-2
lines changed
  • addons/source-python/packages/source-python/entities

1 file changed

+2
-2
lines changed

addons/source-python/packages/source-python/entities/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def get_parent(self):
335335
# Return the parent of the entity...
336336
return Entity(index_from_inthandle(parent_inthandle))
337337

338-
def set_parent(self, parent):
338+
def _set_parent(self, parent):
339339
"""Set the parent of the entity.
340340
341341
:param Entity parent:
@@ -344,7 +344,7 @@ def set_parent(self, parent):
344344
self.set_parent(parent)
345345

346346
parent = property(
347-
get_parent, set_parent,
347+
get_parent, _set_parent,
348348
doc="""Property to get/set the parent of the entity.""")
349349

350350
@property

0 commit comments

Comments
 (0)