提交 f364a854 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Virgile Andreani

Fix f-less f-strings

上级 93825dcc
......@@ -533,12 +533,11 @@ class DeviceParam(ConfigParam):
)
elif val == self.default:
return val
else:
raise ValueError(
'Invalid value ("{val}") for configuration '
'variable "{self.name}". Valid options start with '
'one of "cpu".'
)
raise ValueError(
f'Invalid value ("{val}") for configuration '
f'variable "{self.name}". Valid options start with '
'one of "cpu".'
)
def __str__(self):
return f"{self.name} ({self.default})"
......
......@@ -148,7 +148,7 @@ def _check_scipy_linalg_matrix(a, func_name):
)
raise numba.TypingError(msg, highlighting=False)
if not isinstance(a.dtype, types.Float | types.Complex):
msg = "{prefix}.{func_name}() only supported on float and complex arrays."
msg = f"{prefix}.{func_name}() only supported on float and complex arrays."
raise numba.TypingError(msg, highlighting=False)
......
......@@ -1951,7 +1951,7 @@ def _tensordot_as_dot(a, b, axes, dot, batched):
if not np.isscalar(axes) and len(axes) != 2:
raise ValueError(
"Axes should be an integer or a "
"list/tuple of len 2 ({axes} was provided)"
f"list/tuple of len 2 ({axes} was provided)"
)
# if 'axes' is a number of axes to multiply and sum over (trailing axes
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论