summaryrefslogtreecommitdiff
path: root/pylint/checkers/nested_min_max.py
diff options
context:
space:
mode:
Diffstat (limited to 'pylint/checkers/nested_min_max.py')
-rw-r--r--pylint/checkers/nested_min_max.py10
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]