]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Rename files for consistency.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 18 Mar 2022 15:23:15 +0000 (16:23 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 18 Mar 2022 15:23:15 +0000 (16:23 +0100)
tests/test_lib_sledrun_json_to_wikitext.py [deleted file]
tests/test_lib_sledrun_wikitext_from_json.py [new file with mode: 0644]
wrpylib/lib_sledrun_json_to_wikitext.py [deleted file]
wrpylib/lib_sledrun_wikitext_from_json.py [new file with mode: 0644]
wrpylib/wrmwmarkup.py

diff --git a/tests/test_lib_sledrun_json_to_wikitext.py b/tests/test_lib_sledrun_json_to_wikitext.py
deleted file mode 100644 (file)
index 02c9cf9..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-import unittest
-
-from wrpylib.lib_sledrun_json_to_wikitext import strip_eol
-
-
-class TestTrimEol(unittest.TestCase):
-    def test_trim_eol(self):
-        self.assertEqual('', strip_eol(''))
-        self.assertEqual(' abc\n', strip_eol(' abc '))
-        self.assertEqual('  abc\n  def\ngh\n', strip_eol('  abc\n  def   \ngh '))
-        self.assertEqual('', strip_eol('\n\n'))
-        self.assertEqual('abc\n', strip_eol('abc     \n'))
-        self.assertEqual('\na\n', strip_eol('\na\n\n'))
diff --git a/tests/test_lib_sledrun_wikitext_from_json.py b/tests/test_lib_sledrun_wikitext_from_json.py
new file mode 100644 (file)
index 0000000..f379cc4
--- /dev/null
@@ -0,0 +1,13 @@
+import unittest
+
+from wrpylib.lib_sledrun_wikitext_from_json import strip_eol
+
+
+class TestTrimEol(unittest.TestCase):
+    def test_trim_eol(self):
+        self.assertEqual('', strip_eol(''))
+        self.assertEqual(' abc\n', strip_eol(' abc '))
+        self.assertEqual('  abc\n  def\ngh\n', strip_eol('  abc\n  def   \ngh '))
+        self.assertEqual('', strip_eol('\n\n'))
+        self.assertEqual('abc\n', strip_eol('abc     \n'))
+        self.assertEqual('\na\n', strip_eol('\na\n\n'))
diff --git a/wrpylib/lib_sledrun_json_to_wikitext.py b/wrpylib/lib_sledrun_json_to_wikitext.py
deleted file mode 100644 (file)
index 86c5055..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-def strip_eol(text: str) -> str:
-    """Remove each whitespace from end of lines of string and also remove trailing empty lines."""
-    result = '\n'.join(line.rstrip() for line in text.splitlines(False))
-    result = result.rstrip()
-    if len(result) > 0:
-        return result + '\n'
-    return ''
diff --git a/wrpylib/lib_sledrun_wikitext_from_json.py b/wrpylib/lib_sledrun_wikitext_from_json.py
new file mode 100644 (file)
index 0000000..86c5055
--- /dev/null
@@ -0,0 +1,7 @@
+def strip_eol(text: str) -> str:
+    """Remove each whitespace from end of lines of string and also remove trailing empty lines."""
+    result = '\n'.join(line.rstrip() for line in text.splitlines(False))
+    result = result.rstrip()
+    if len(result) > 0:
+        return result + '\n'
+    return ''
index 66c9f5940d7bb421d3a84025e2b094cc9afa90f7..91d876ddacd9f54cfd2ecdc517ac47a0d51de59c 100644 (file)
@@ -11,7 +11,7 @@ from mwparserfromhell.nodes import Template, Wikilink
 import wrpylib.wrvalidators
 import wrpylib.mwmarkup
 import wrpylib.wrmwdb
 import wrpylib.wrvalidators
 import wrpylib.mwmarkup
 import wrpylib.wrmwdb
-from wrpylib.lib_sledrun_json_to_wikitext import strip_eol
+from wrpylib.lib_sledrun_wikitext_from_json import strip_eol
 from wrpylib.wrvalidators import LonLat, opt_lonlat_from_str, opt_lonlat_to_str, opt_uint_from_str, opt_uint_to_str, \
     opt_str_opt_comment_enum_to_str, lift_german_to_str, webauskunft_to_str, cachet_german_to_str, \
     opt_phone_comment_enum_to_str, lift_german_from_str, GASTHAUSBOX_DICT, opt_difficulty_german_from_str, \
 from wrpylib.wrvalidators import LonLat, opt_lonlat_from_str, opt_lonlat_to_str, opt_uint_from_str, opt_uint_to_str, \
     opt_str_opt_comment_enum_to_str, lift_german_to_str, webauskunft_to_str, cachet_german_to_str, \
     opt_phone_comment_enum_to_str, lift_german_from_str, GASTHAUSBOX_DICT, opt_difficulty_german_from_str, \