Skip to content

Commit 5fa476b

Browse files
committed
Deorphanize Node
By giving it a parent, which is the module in which the ScanningInstrument class was defined
1 parent abb695a commit 5fa476b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/genie_python/scanning_instrument_pylint_plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import astroid
2-
from astroid import MANAGER, NodeNG
2+
from astroid import MANAGER
33

44

55
def register(linter: None) -> None:
@@ -22,7 +22,7 @@ def transform(cls: astroid.ClassDef) -> None:
2222
name=public_method.name,
2323
lineno=0,
2424
col_offset=0,
25-
parent=NodeNG(lineno=0, col_offset=0, parent=None, end_lineno=0, end_col_offset=0),
25+
parent=cls.parent,
2626
end_lineno=0,
2727
end_col_offset=0,
2828
)

0 commit comments

Comments
 (0)