File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 8
8
import functools
9
9
from collections .abc import Mapping
10
10
from pathlib import Path
11
- from typing import Any , TypedDict , Literal
11
+ from typing import Any , Literal , TypedDict
12
12
13
13
import uproot
14
14
import uproot .reading
@@ -46,10 +46,12 @@ class MetaDict(MetaDictRequired, total=False):
46
46
def is_dir (item : Any ) -> bool :
47
47
return False
48
48
49
+
49
50
@is_dir .register
50
51
def _ (item : uproot .reading .ReadOnlyDirectory ) -> Literal [True ]:
51
52
return True
52
53
54
+
53
55
@is_dir .register
54
56
def _ (item : uproot .behaviors .TBranch .HasBranches ) -> bool :
55
57
return len (item .branches ) > 0
@@ -59,6 +61,7 @@ def _(item: uproot.behaviors.TBranch.HasBranches) -> bool:
59
61
def get_children (item : Any ) -> set [str ]:
60
62
raise RuntimeError ("Should not be called, protect with is_dir!" )
61
63
64
+
62
65
@get_children .register
63
66
def _ (item : Mapping ) -> set [str ]:
64
67
return {
You can’t perform that action at this time.
0 commit comments