File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ def __init__(
19
19
self ,
20
20
node : ast .AstNode ,
21
21
name : str ,
22
- type : Optional [str ] = None ,
22
+ type_str : Optional [str ] = None ,
23
23
semstr : str = "" ,
24
24
) -> None :
25
25
"""Initialize the class."""
26
- self .node = node
26
+ self .node_type = type ( node )
27
27
self .name = name
28
- self .type = type
28
+ self .type = type_str
29
29
self .semstr = semstr
30
30
31
31
def __repr__ (self ) -> str :
@@ -40,7 +40,7 @@ def get_children(
40
40
self_scope = str (scope ) + f".{ self .name } ({ self .type } )"
41
41
_ , children = sem_registry .lookup (scope = SemScope .get_scope_from_str (self_scope ))
42
42
if filter and children and isinstance (children , list ):
43
- return [i for i in children if isinstance ( i . node , filter ) ]
43
+ return [i for i in children if i . node_type == filter ]
44
44
return children if children and isinstance (children , list ) else []
45
45
46
46
Original file line number Diff line number Diff line change @@ -362,4 +362,4 @@ def run_import(
362
362
lang = spec .language ,
363
363
)
364
364
self .result = import_return
365
- return self .result
365
+ return self .result
You can’t perform that action at this time.
0 commit comments