Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 13, 2025
1 parent c444f6a commit 2a7670c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dargs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

from .dargs import Argument, ArgumentEncoder, Variant

__all__ = ["Argument", "Variant", "ArgumentEncoder"]
__all__ = ["Argument", "ArgumentEncoder", "Variant"]
5 changes: 2 additions & 3 deletions dargs/dargs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 2a7670c

Please sign in to comment.