Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] authored Jan 28, 2025
1 parent 32616c3 commit 58bd094
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-toml
# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.9.3
hooks:
- id: ruff
args: [ --fix ]
Expand Down
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 58bd094

Please sign in to comment.