Skip to content

Commit

Permalink
Use Uninferable
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Jun 28, 2023
1 parent 6183718 commit 3a1b0dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astroid/protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3a1b0dd

Please sign in to comment.