From 2a7670c1ad14482303b6bb930ddb575107112432 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:21:36 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dargs/__init__.py | 2 +- dargs/dargs.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dargs/__init__.py b/dargs/__init__.py index af2f59b..77ec18d 100644 --- a/dargs/__init__.py +++ b/dargs/__init__.py @@ -2,4 +2,4 @@ from .dargs import Argument, ArgumentEncoder, Variant -__all__ = ["Argument", "Variant", "ArgumentEncoder"] +__all__ = ["Argument", "ArgumentEncoder", "Variant"] diff --git a/dargs/dargs.py b/dargs/dargs.py index caf8dc6..3d7734b 100644 --- a/dargs/dargs.py +++ b/dargs/dargs.py @@ -460,7 +460,7 @@ def _check_exist(self, argdict: dict, path=None): return if self.name not in argdict: raise ArgumentKeyError( - path, f"key `{self.name}` is required " "in arguments but not found" + path, f"key `{self.name}` is required in arguments but not found" ) def _check_data(self, value: Any, path=None): @@ -862,8 +862,7 @@ def get_choice(self, argdict: dict, path=None) -> Argument: else: raise ArgumentKeyError( path, - f"key `{self.flag_name}` is required " - "to choose variant but not found.", + f"key `{self.flag_name}` is required to choose variant but not found.", ) def flatten_sub(self, argdict: dict, path=None) -> dict[str, Argument]: