Skip to content

Commit

Permalink
fixup! make constants have synthetic root as their parent
Browse files Browse the repository at this point in the history
  • Loading branch information
temyurchenko committed Oct 7, 2024
1 parent 3969f5d commit eab2b06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion astroid/nodes/scoped_nodes/scoped_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 # noqa
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)
Expand Down

0 comments on commit eab2b06

Please sign in to comment.