Skip to content

Commit

Permalink
Accept the ^ char but don't do anything with it.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescrake-merani committed Oct 2, 2024
1 parent 8bf4340 commit b821285
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sasdata/quantities/unit_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def split_unit_str(unit_str: str) -> list[str]:
def validate_unit_str(unit_str: str) -> bool:
"""Validate whether unit_str is valid. This doesn't mean that the unit specified in unit_str exists but rather it
only consists of letters, and numbers as a unit string should."""
return not fullmatch(r'[A-Za-zΩ%Å1-9\-\+/\ \.]+', unit_str) is None
return not fullmatch(r'[A-Za-zΩ%Å^1-9\-\+/\ \.]+', unit_str) is None

def parse_single_unit(unit_str: str, unit_group: UnitGroup | None = None, longest_unit: bool = True) -> tuple[Unit | None, str]:
"""Attempts to find a single unit for unit_str. Return this unit, and the remaining string in a tuple. If a unit
Expand Down

0 comments on commit b821285

Please sign in to comment.