Fix formatting oddness for foes with no weakness

This commit is contained in:
Trysdyn Black 2024-10-16 22:58:57 -07:00
parent f733ebb66d
commit 82ff5f86f4

View file

@ -60,6 +60,11 @@ class Parser: # noqa: PLR0904
weak_text = "WEAK: "
info["nullifies"] = null_text.split(": ")[1].split(", ")
info["weak"] = weak_text.split(": ")[1].split(", ")
# Due to split oddness we can populate a blank string into weakness
# Delete it if we did.
if info["weak"] == [""]:
del info["weak"]
# Specials are name=>desc as k:v
# I *think* you can only have one special...
elif line.startswith("SPECIAL"):