From 844c07bb46e337f9537a4188cac5f0fd49865e41 Mon Sep 17 00:00:00 2001 From: Artem Yurchenko Date: Mon, 7 Oct 2024 02:17:37 -0400 Subject: [PATCH] fixup! make constants have synthetic root as their parent --- astroid/nodes/scoped_nodes/scoped_nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astroid/nodes/scoped_nodes/scoped_nodes.py b/astroid/nodes/scoped_nodes/scoped_nodes.py index 271f9501df..e9122860ba 100644 --- a/astroid/nodes/scoped_nodes/scoped_nodes.py +++ b/astroid/nodes/scoped_nodes/scoped_nodes.py @@ -1586,7 +1586,7 @@ def infer_call_result( if isinstance(metaclass, ClassDef): try: # Find the first non-None inferred base value - get_base = lambda arg: next( + get_base = lambda arg: next( # pylint: disable=unnecessary-lambda-assignment b for b in arg.infer(context=context.clone() if context else None) if not (isinstance(b, node_classes.Const) and b.value is None)