mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-22 15:45:39 +08:00
Code cleanup (#234)
This commit is contained in:
1 parent
8b414bafab
commit
e35781fe85
14 files changed
+46
-68
No files matched your search
@@ -16,7 +16,6 @@
|
||||
Functions for traversing server bridge tree nodes (storage)
|
||||
"""
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
from collections import defaultdict
|
||||
from typing import List
|
||||
@@ -28,7 +27,7 @@ class TreeNode(defaultdict):
|
||||
__slots__ = ["object", "transform", "properties", "animation"]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(TreeNode, self).__init__(*args, **kwargs)
|
||||
super().__init__(*args, **kwargs)
|
||||
self.object = None
|
||||
self.properties = []
|
||||
self.transform = None
|
||||
@@ -46,8 +45,7 @@ def walk(tree: TreeNode) -> None:
|
||||
"""
|
||||
yield tree
|
||||
for v in tree.values():
|
||||
for t in walk(v): # could use `yield from` if we didn't need python2
|
||||
yield t
|
||||
yield from walk(v)
|
||||
|
||||
|
||||
def find_node(tree: TreeNode, path: List[str]) -> TreeNode:
|
||||
|
||||
Reference in new issue
Block a user