File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,12 @@ def is_dir(item: Any) -> bool: # noqa: ARG001
51
51
def _ (item : uproot .reading .ReadOnlyDirectory ) -> Literal [True ]: # noqa: ARG001
52
52
return True
53
53
54
+
54
55
@is_dir .register
55
56
def _ (item : uproot .behaviors .TBranch .HasBranches ) -> bool :
56
57
return len (item .branches ) > 0
57
58
59
+
58
60
@is_dir .register
59
61
def _ (item : uproot .behaviors .RNTuple .HasFields ) -> bool :
60
62
return len (item .keys ()) > 0
@@ -155,8 +157,12 @@ def _process_item_tfile(
155
157
)
156
158
157
159
158
- @process_item .register
159
- def _process_item_ttree (uproot_object : uproot .TTree | uproot .behaviors .RNTuple .RNTuple ) -> MetaDict :
160
+ # Python 3.11 can just use `|` directly for register
161
+ @process_item .register (uproot .TTree )
162
+ @process_item .register (uproot .behaviors .RNTuple .RNTuple )
163
+ def _process_item_ttree (
164
+ uproot_object : uproot .TTree | uproot .behaviors .RNTuple .RNTuple ,
165
+ ) -> MetaDict :
160
166
"""
161
167
Given an tree, return a rich.tree.Tree output.
162
168
"""
You can’t perform that action at this time.
0 commit comments