From 8532fc3326340ab04294d1e84cb07bd781363cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Noord?= <13665637+DanielNoord@users.noreply.github.com> Date: Mon, 17 Jan 2022 12:42:33 +0100 Subject: Add typing to ``LocalsDictNodeNG.locals`` (#1354) --- astroid/nodes/scoped_nodes/scoped_nodes.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 74b3b045..dbc3f53b 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -50,7 +50,7 @@ import os import sys import typing import warnings -from typing import List, Optional, TypeVar, Union, overload +from typing import Dict, List, Optional, TypeVar, Union, overload from astroid import bases from astroid import decorators as decorators_mod @@ -230,11 +230,8 @@ class LocalsDictNodeNG(node_classes.LookupMixIn, node_classes.NodeNG): # attributes below are set by the builder module or by raw factories - locals = {} - """A map of the name of a local variable to the node defining the local. - - :type: dict(str, NodeNG) - """ + locals: Dict[str, List[node_classes.NodeNG]] = {} + """A map of the name of a local variable to the node defining the local.""" def qname(self): """Get the 'qualified' name of the node. -- cgit v1.2.1