Skip to content

Commit f364a85

Browse files
committed
Fix f-less f-strings
1 parent 93825dc commit f364a85

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

pytensor/configparser.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -533,12 +533,11 @@ def _apply(self, val):
533533
)
534534
elif val == self.default:
535535
return val
536-
else:
537-
raise ValueError(
538-
'Invalid value ("{val}") for configuration '
539-
'variable "{self.name}". Valid options start with '
540-
'one of "cpu".'
541-
)
536+
raise ValueError(
537+
f'Invalid value ("{val}") for configuration '
538+
f'variable "{self.name}". Valid options start with '
539+
'one of "cpu".'
540+
)
542541

543542
def __str__(self):
544543
return f"{self.name} ({self.default})"

pytensor/link/numba/dispatch/slinalg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _check_scipy_linalg_matrix(a, func_name):
148148
)
149149
raise numba.TypingError(msg, highlighting=False)
150150
if not isinstance(a.dtype, types.Float | types.Complex):
151-
msg = "{prefix}.{func_name}() only supported on float and complex arrays."
151+
msg = f"{prefix}.{func_name}() only supported on float and complex arrays."
152152
raise numba.TypingError(msg, highlighting=False)
153153

154154

pytensor/tensor/math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,7 @@ def _tensordot_as_dot(a, b, axes, dot, batched):
19511951
if not np.isscalar(axes) and len(axes) != 2:
19521952
raise ValueError(
19531953
"Axes should be an integer or a "
1954-
"list/tuple of len 2 ({axes} was provided)"
1954+
f"list/tuple of len 2 ({axes} was provided)"
19551955
)
19561956

19571957
# if 'axes' is a number of axes to multiply and sum over (trailing axes

0 commit comments

Comments
 (0)