From cfe70d8716f38718c93d6ea9b3d61977efec821f Mon Sep 17 00:00:00 2001 From: wangshuide2020 Date: Wed, 7 Jul 2021 15:40:47 +0800 Subject: [PATCH] remove the redundant symbol of TypeError. --- mindspore/_checkparam.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/_checkparam.py b/mindspore/_checkparam.py index 2ada3909499..5bfa93783a0 100644 --- a/mindspore/_checkparam.py +++ b/mindspore/_checkparam.py @@ -487,7 +487,7 @@ class Validator: addition_error_info = '' type_str = (type(type_).__name__ if isinstance(type_, (tuple, list)) else "") + str(type_) raise TypeError(f'For \'{prim_name}\', the type of `{arg_name}` should be subclass' - f' of {", ".join((str(x) for x in template_types))}, but got {type_str}.' + f' of {", ".join((str(x) for x in template_types))}, but got {type_str}' f' {addition_error_info}. This message is only for reference. The supported data types' f' depend on the hardware that executes the operator' f' and it is a subset of the data types above.')