From 535afcb4c6027412285bc6dc3568da82edf6776f Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Fri, 19 Aug 2022 19:59:58 -0700 Subject: [PATCH] Fix replacements --- comictaggerlib/filerenamer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/comictaggerlib/filerenamer.py b/comictaggerlib/filerenamer.py index 726df00..4f09f49 100644 --- a/comictaggerlib/filerenamer.py +++ b/comictaggerlib/filerenamer.py @@ -33,12 +33,12 @@ logger = logging.getLogger(__name__) class Replacements(NamedTuple): - literal_text: set[tuple[str, str]] - format_value: set[tuple[str, str]] + literal_text: list[tuple[str, str]] + format_value: list[tuple[str, str]] REPLACEMENTS = Replacements( - literal_text={(": ", " - "), (":", "-")}, format_value={(": ", " - "), (":", "-"), ("/", "-"), ("\\", "-")} + literal_text=[(": ", " - "), (":", "-")], format_value=[(": ", " - "), (":", "-"), ("/", "-"), ("\\", "-")] ) @@ -65,7 +65,7 @@ class MetadataFormatter(string.Formatter): return "" return cast(str, super().format_field(value, format_spec)) - def handle_replacements(self, string: str, replacements: set[tuple[str, str]]) -> str: + def handle_replacements(self, string: str, replacements: list[tuple[str, str]]) -> str: for f, r in replacements: string = string.replace(f, r) return string