Skip to content

Commit

Permalink
wrong logic for flag check
Browse files Browse the repository at this point in the history
  • Loading branch information
dlakaplan committed Jun 18, 2024
1 parent 5787f1b commit 3dd8df8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pint/toa.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ def check_allowed_key(k: Any) -> None:
def check_allowed_value(k: str, v: Any) -> None:
if not isinstance(v, str):
raise ValueError(f"value {v} for key {k} must be a string")
if not v and len(v.split()) != 1:
if len(v.split()) != 1:
raise ValueError(f"value {repr(v)} for key {k} cannot contain whitespace")

def __setitem__(self, key: str, val: str):
Expand Down

0 comments on commit 3dd8df8

Please sign in to comment.