diff options
author | Jacob Walls <jacobtylerwalls@gmail.com> | 2023-04-15 08:55:40 -0400 |
---|---|---|
committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2023-04-16 11:39:56 -0400 |
commit | b807a2508075e04e5f8dc9459e5576d3ca5bc47c (patch) | |
tree | dbbf6522cbcc73b27f1d9c4d61e92ccd2142b186 | |
parent | 6028f202c4b637f9edc54cef815586a54fd65958 (diff) | |
download | pylint-git-b807a2508075e04e5f8dc9459e5576d3ca5bc47c.tar.gz |
Cope with changes to `Starred` constructor
-rw-r--r-- | pylint/checkers/nested_min_max.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pylint/checkers/nested_min_max.py b/pylint/checkers/nested_min_max.py index 1198cc6d1..8825f296e 100644 --- a/pylint/checkers/nested_min_max.py +++ b/pylint/checkers/nested_min_max.py @@ -10,6 +10,7 @@ import copy 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 @@ -96,7 +97,14 @@ class NestedMinMaxChecker(BaseChecker): 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] |