Skip to content

Commit 7cdb1be

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fad9daa commit 7cdb1be

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mypyc/ir/ops.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,9 +1047,13 @@ def __init__(self, src: Value, index: int, line: int = -1, *, borrow: bool = Fal
10471047
super().__init__(line)
10481048
self.src = src
10491049
self.index = index
1050-
assert isinstance(src.type, RTuple), "TupleGet only operates on tuples, not {type(src.type).__name__}"
1050+
assert isinstance(
1051+
src.type, RTuple
1052+
), "TupleGet only operates on tuples, not {type(src.type).__name__}"
10511053
src_len = len(src.type.types)
1052-
assert -src_len <= index <= src_len - 1, f"Index out of range.\nsource type: {src.type}\nindex: {index}"
1054+
assert (
1055+
-src_len <= index <= src_len - 1
1056+
), f"Index out of range.\nsource type: {src.type}\nindex: {index}"
10531057
self.type = src.type.types[index]
10541058
self.is_borrowed = borrow
10551059

0 commit comments

Comments
 (0)