From 86165e028585b3bd05890f62a2955cb3e9251808 Mon Sep 17 00:00:00 2001 From: Abeautifulsnow <1491444340@qq.com> Date: Mon, 6 Nov 2023 22:55:24 +0800 Subject: [PATCH] update --- pkgu.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgu.py b/pkgu.py index ae389b8..28d78f4 100644 --- a/pkgu.py +++ b/pkgu.py @@ -342,19 +342,21 @@ def __exit__(self, exc_type, exc_value, traceback): class BaseOptions(metaclass=ABCMeta): + __not_implement_msg = "method not implemented" + @abstractmethod def base_option_single( self, title: str, options: List[str], name: Optional[str] = None ) -> str: - raise NotImplementedError("method not implemented") + raise NotImplementedError(self.__not_implement_msg) @abstractmethod def ifUpgradeModules(self) -> str: - raise NotImplementedError("method not implemented") + raise NotImplementedError(self.__not_implement_msg) @abstractmethod def ifUpdateAllModules(self) -> str: - raise NotImplementedError("method not implemented") + raise NotImplementedError(self.__not_implement_msg) @abstractmethod def updateOneOfPackages( @@ -362,7 +364,7 @@ def updateOneOfPackages( packages: List[Tuple[T_NAME, T_VERSION, T_LATEST_VERSION, T_LATEST_FILETYPE]], # upgrade_func: Callable[[str, str, str], None], ) -> Optional[Tuple[str]]: - raise NotImplementedError("method not implemented") + raise NotImplementedError(self.__not_implement_msg) class UserOptionsForWindows(BaseOptions):