Skip to content

Commit

Permalink
将src/cpmel/_object_types/core.py文件中的other_node_cls_table变量修改为__other_…
Browse files Browse the repository at this point in the history
…node_cls_table,以明确其私有性。
  • Loading branch information
苍之幻灵 committed Jul 26, 2022
1 parent 4099796 commit dd9752b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CPMel/_object_types/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,12 @@ def __exit__(self, exc_type, exc_val, exc_tb):
pass


other_node_cls_table = dict()
__other_node_cls_table = dict()


def other_node_cls(api_type_str):
def _node(cls):
other_node_cls_table[api_type_str] = cls
__other_node_cls_table[api_type_str] = cls
return cls

return _node
Expand All @@ -566,7 +566,7 @@ def new_object(o):

# 创建节点
o = ref.unsafe_m_selection_list().getDependNode(0)
other_cls = other_node_cls_table.get(o.apiTypeStr)
other_cls = __other_node_cls_table.get(o.apiTypeStr)
if other_cls is None:
if ref.ref_type == cr.TDependencyNode:
return Node(ref)
Expand Down

0 comments on commit dd9752b

Please sign in to comment.