diff --git a/openfisca_core/indexed_enums/enum_array.py b/openfisca_core/indexed_enums/enum_array.py index 0cc1f197d3..7ea23a8ecb 100644 --- a/openfisca_core/indexed_enums/enum_array.py +++ b/openfisca_core/indexed_enums/enum_array.py @@ -150,8 +150,8 @@ def __ne__(self, other: Any) -> Union[ArrayType[bool], bool]: def _forbidden_operation(self, other: Any) -> NoReturn: raise TypeError( - "Forbidden operation. The only operations allowed on EnumArrays " - "are '==' and '!='.", + "Forbidden operation. The only operations allowed on " + f"{self.__class__.__name__}s are '==' and '!='.", ) __add__ = _forbidden_operation