8000 minor · pytorch/pytorch@073496e · GitHub
[go: up one dir, main page]

Skip to content

Commit 073496e

Browse files
committed
minor
1 parent d7e2046 commit 073496e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

torch/_prims_common/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,9 +1017,7 @@ def get_higher_type(a: type, b: type) -> type:
10171017
a, b = _maybe_get_pytype(a), _maybe_get_pytype(b)
10181018
# Type checking
10191019
if a not in _ordered_types or b not in _ordered_types:
1020-
raise RuntimeError(
1021-
f"Expected builtin numeric types, found {type(a)}, {type(b)}"
1022-
)
1020+
raise RuntimeError(f"Expected builtin numeric types, found {a}, {b}")
10231021

10241022
if a is b:
10251023
return a
@@ -1122,9 +1120,7 @@ def is_weakly_lesser_type(a: type, b: type) -> bool:
11221120
a, b = _maybe_get_pytype(a), _maybe_get_pytype(b)
11231121

11241122
if a not in _ordered_types or b not in _ordered_types:
1125-
raise RuntimeError(
1126-
f"Expected builtin numeric types, found {type(a)}, {type(b)}"
1127-
)
1123+
raise RuntimeError(f"Expected builtin numeric types, found {a}, {b}")
11281124

11291125
for typ in _ordered_types:
11301126
if a == typ:

0 commit comments

Comments
 (0)
0