From 82ff5f86f4449b8c1fa14106894ed6c4eae7c0c4 Mon Sep 17 00:00:00 2001 From: Trysdyn Black Date: Wed, 16 Oct 2024 22:58:57 -0700 Subject: [PATCH] Fix formatting oddness for foes with no weakness --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 1394bee..7b2798d 100644 --- a/main.py +++ b/main.py @@ -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"):