summaryrefslogtreecommitdiff
path: root/astroid/nodes
diff options
context:
space:
mode:
authorDaniƫl van Noord <13665637+DanielNoord@users.noreply.github.com>2021-12-16 12:16:20 +0100
committerGitHub <noreply@github.com>2021-12-16 12:16:20 +0100
commitdddf2daaa95754772ebf8a84fb25cd689c98736e (patch)
treef6b60ea3591e3739227f75b0b1aa1e23f52e80b2 /astroid/nodes
parente3730a7aaf35030edcafbb5ec0509fb8ff070e33 (diff)
downloadastroid-git-dddf2daaa95754772ebf8a84fb25cd689c98736e.tar.gz
Make Module call the __init__ of NodeNG (#1262)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Diffstat (limited to 'astroid/nodes')
-rw-r--r--astroid/nodes/scoped_nodes.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/astroid/nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes.py
index 0c745a4f..96a034c8 100644
--- a/astroid/nodes/scoped_nodes.py
+++ b/astroid/nodes/scoped_nodes.py
@@ -389,10 +389,8 @@ class Module(LocalsDictNodeNG):
:type: int or None
"""
- lineno = 0
+ lineno: Literal[0] = 0
"""The line that this node appears on in the source code.
-
- :type: int or None
"""
# attributes below are set by the builder module or by raw factories
@@ -469,7 +467,6 @@ class Module(LocalsDictNodeNG):
)
_other_other_fields = ("locals", "globals")
- lineno: None
col_offset: None
end_lineno: None
end_col_offset: None
@@ -512,7 +509,6 @@ class Module(LocalsDictNodeNG):
self.file = file
self.path = path
self.package = package
- self.parent = parent
self.pure_python = pure_python
self.locals = self.globals = {}
"""A map of the name of a local variable to the node defining the local.
@@ -526,6 +522,8 @@ class Module(LocalsDictNodeNG):
"""
self.future_imports = set()
+ super().__init__(lineno=0, parent=parent)
+
# pylint: enable=redefined-builtin
def postinit(self, body=None):