diff --git a/astroid/protocols.py b/astroid/protocols.py index 46cb5d9ac..d15f19ecf 100644 --- a/astroid/protocols.py +++ b/astroid/protocols.py @@ -168,7 +168,7 @@ def _multiply_seq_by_int( ) -> _TupleListNodeT: node = self.__class__(parent=opnode) if isinstance(other.value, int) and other.value > 1e8: - node.elts = [nodes.Const(NotImplemented)] + node.elts = [util.Uninferable] return node filtered_elts = ( helpers.safe_infer(elt, context) or util.Uninferable diff --git a/tests/test_protocols.py b/tests/test_protocols.py index f85c22314..8c318252b 100644 --- a/tests/test_protocols.py +++ b/tests/test_protocols.py @@ -284,7 +284,7 @@ def test_uninferable_list_multiplication() -> None: """Attempting to calculate the result is prohibitively expensive.""" parsed = extract_node("[0] * 123456789") element = parsed.inferred()[0].elts[0] - assert element.value is NotImplemented + assert element.value is Uninferable def test_named_expr_inference() -> None: