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

Fix f-less f-strings

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