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 Feb 7, 2025
1 parent 87d8f35 commit 2cf1c65
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions deepmd/pd/utils/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def to_bool(flag: int | bool | str) -> bool:
flag = flag.lower()
if flag not in ["1", "0", "true", "false"]:
raise ValueError(

Check warning on line 49 in deepmd/pd/utils/env.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pd/utils/env.py#L46-L49

Added lines #L46 - L49 were not covered by tests
"flag must be either '0', '1', 'true', 'false', "
f"but received '{flag}'"
f"flag must be either '0', '1', 'true', 'false', but received '{flag}'"
)
return flag in ["1", "true"]

Check warning on line 52 in deepmd/pd/utils/env.py

View check run for this annotation

Codecov / codecov/patch

deepmd/pd/utils/env.py#L52

Added line #L52 was not covered by tests

Expand Down

0 comments on commit 2cf1c65

Please sign in to comment.