From 2fa1d5cfc34a5440df6652a00106e22bbb99f7fd Mon Sep 17 00:00:00 2001 From: Mario Santa Cruz Date: Fri, 18 Oct 2024 15:32:41 +0000 Subject: [PATCH] fix: avoid ruff linter error EM101 --- src/anemoi/training/utils/masks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/anemoi/training/utils/masks.py b/src/anemoi/training/utils/masks.py index a85c783..27e13a3 100644 --- a/src/anemoi/training/utils/masks.py +++ b/src/anemoi/training/utils/masks.py @@ -23,11 +23,13 @@ class BaseMask: @abstractmethod def apply(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: - raise NotImplementedError("Method `apply` must be implemented in subclass.") + error_message = "Method `apply` must be implemented in subclass." + raise NotImplementedError(error_message) @abstractmethod def rollout_boundary(self, x: torch.Tensor, *args, **kwargs) -> torch.Tensor: - raise NotImplementedError("Method `rollout_boundary` must be implemented in subclass.") + error_message = "Method `rollout_boundary` must be implemented in subclass." + raise NotImplementedError(error_message) class Boolean1DMask(BaseMask):