Package: grammalecte / 2.1.2+ds2-2

0005-remove-profanity.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Agathe Porte <debian@microjoe.org>
Date: Tue, 25 May 2021 16:40:51 +0200
Subject: remove profanity

Forwarded: https://grammalecte.net/thread.php?prj=fr&t=965
---
 gc_core/py/lang_core/tests_core.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gc_core/py/lang_core/tests_core.py b/gc_core/py/lang_core/tests_core.py
index 1d76cda..0995e26 100644
--- a/gc_core/py/lang_core/tests_core.py
+++ b/gc_core/py/lang_core/tests_core.py
@@ -50,8 +50,7 @@ def perf (sVersion, sResultFile=""):
             hDst.write("\n")
 
 
-def _fuckBackslashUTF8 (s):
-    "fuck that shit"
+def _BackslashUTF8 (s):
     return s.replace("\u2019", "'").replace("\u2013", "–").replace("\u2014", "—")
 
 
@@ -99,7 +98,7 @@ class TestGrammarChecking (unittest.TestCase):
                 # tests
                 if sExpectedErrors != sFoundErrors:
                     print("\n# Line num: " + sLineNum + \
-                          "\n> to check: " + _fuckBackslashUTF8(sTextToCheck) + \
+                          "\n> to check: " + _BackslashUTF8(sTextToCheck) + \
                           "\n  expected: " + sExpectedErrors + \
                           "\n  found:    " + sFoundErrors + \
                           "\n  errors:   \n" + sListErr)
@@ -107,7 +106,7 @@ class TestGrammarChecking (unittest.TestCase):
                 elif sExceptedSuggs:
                     if not self._checkSuggestions(sExceptedSuggs, sFoundSuggs):
                         print("\n# Line num: " + sLineNum + \
-                              "\n> to check: " + _fuckBackslashUTF8(sTextToCheck) + \
+                              "\n> to check: " + _BackslashUTF8(sTextToCheck) + \
                               "\n  expected: " + sExceptedSuggs + \
                               "\n  found:    " + sFoundSuggs + \
                               "\n  errors:   \n" + sListErr)