Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pyEQL/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def standardize_formula(formula: str):
formula = formula.replace(char, rep)

# replace different types of dashes with a minus sign
for char in [r"‑", r"‐", r"‒", r"–", r"—"]: # noqa: RUF001
for char in [r"‑", r"‐", r"‒", r"–", r"—", r"−"]: # noqa: RUF001
formula = formula.replace(char, "-")

sform = Ion.from_formula(formula).reduced_formula
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_standardize_formula():
assert standardize_formula("Mg⁺²") == "Mg[+2]"
assert standardize_formula("VO²⁺") == "VO[+2]"
assert standardize_formula("SO₄²⁻") == "SO4[-2]"
for dash in ["‑", "‐", "‒", "–", "—"]: # noqa: RUF001
for dash in ["‑", "‐", "‒", "–", "—", "−"]: # noqa: RUF001
assert standardize_formula(f"Cl{dash}") == "Cl[-1]"

assert standardize_formula("H2O") == "H2O(aq)"
Expand Down
Loading