Skip to content

Commit

Permalink
Cope with changes to Starred constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Apr 16, 2023
1 parent 6028f20 commit b807a25
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pylint/checkers/nested_min_max.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from typing import TYPE_CHECKING

from astroid import nodes, objects
from astroid.const import Context

from pylint.checkers import BaseChecker
from pylint.checkers.utils import only_required_for_messages, safe_infer
Expand Down Expand Up @@ -96,7 +97,14 @@ def visit_call(self, node: nodes.Call) -> None:
if isinstance(
inferred, (nodes.List, nodes.Tuple, nodes.Set, *DICT_TYPES)
):
splat_node = nodes.Starred(lineno=inferred.lineno)
splat_node = nodes.Starred(
ctx=Context.Load,
lineno=inferred.lineno,
col_offset=0,
parent=nodes.NodeNG(),
end_lineno=0,
end_col_offset=0,
)
splat_node.value = arg
fixed_node.args = (
fixed_node.args[:idx]
Expand Down

0 comments on commit b807a25

Please sign in to comment.