From a848194601cb731b80c7cefb690b87864df8a243 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Tue, 25 May 2021 17:15:13 +0200 Subject: [PATCH] Rename plaintext link option to "plaintext" --- PFERD/crawl/ilias/file_templates.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PFERD/crawl/ilias/file_templates.py b/PFERD/crawl/ilias/file_templates.py index 6f2b1cd..151a41b 100644 --- a/PFERD/crawl/ilias/file_templates.py +++ b/PFERD/crawl/ilias/file_templates.py @@ -97,14 +97,14 @@ URL={{link}} class Links(Enum): IGNORE = "ignore" - PLAIN = "plain" + PLAINTEXT = "plaintext" FANCY = "fancy" INTERNET_SHORTCUT = "internet-shortcut" def template(self) -> Optional[str]: if self == self.FANCY: return _link_template_fancy - elif self == self.PLAIN: + elif self == self.PLAINTEXT: return _link_template_plain elif self == self.INTERNET_SHORTCUT: return _link_template_internet_shortcut @@ -115,7 +115,7 @@ class Links(Enum): def extension(self) -> Optional[str]: if self == self.FANCY: return ".html" - elif self == self.PLAIN: + elif self == self.PLAINTEXT: return ".txt" elif self == self.INTERNET_SHORTCUT: return ".url" @@ -128,5 +128,5 @@ class Links(Enum): try: return Links(string) except ValueError: - raise ValueError("must be one of 'ignore', 'plain'," + raise ValueError("must be one of 'ignore', 'plaintext'," " 'html', 'internet-shortcut'")