[flake8] Fix W605, invalid escape sequence
authorSimon Chabot <simon.chabot@logilab.fr>
Tue, 01 Oct 2019 10:23:30 +0200
changeset 569 ac9b70c9a253
parent 568 e34db1c9be44
child 570 a85a6dd27516
[flake8] Fix W605, invalid escape sequence
nazca/utils/distances.py
nazca/utils/normalize.py
--- a/nazca/utils/distances.py	Tue Oct 01 10:14:52 2019 +0200
+++ b/nazca/utils/distances.py	Tue Oct 01 10:23:30 2019 +0200
@@ -234,7 +234,7 @@
 
 
 def jaccard(stra, strb, tokenizer=None):
-    """ Return the jaccard distance between stra and strb, condering the tokens
+    r""" Return the jaccard distance between stra and strb, condering the tokens
         set of stra and strb. If no tokenizer is given, it use if
         alignement.normalize.tokenize's default one.
 
@@ -247,7 +247,7 @@
 
 
 def generic_jaccard(seta, setb):
-    """ Return the jaccard distance between two sets A and B.
+    r""" Return the jaccard distance between two sets A and B.
 
         J(A, B) = (A \cap B)/(A \cup B)
         d(A, B) = 1 - J(A, B)
--- a/nazca/utils/normalize.py	Tue Oct 01 10:14:52 2019 +0200
+++ b/nazca/utils/normalize.py	Tue Oct 01 10:23:30 2019 +0200
@@ -189,7 +189,7 @@
 
 
 def rgxformat(string, regexp, output):
-    """ Apply the regexp to the ``string`` and return a formatted string
+    r""" Apply the regexp to the ``string`` and return a formatted string
     according to ``output``
 
     eg :
@@ -356,7 +356,7 @@
 
 
 class RegexpNormalizer(BaseNormalizer):
-    """Normalizer that normalize a string based on a regexp
+    r"""Normalizer that normalize a string based on a regexp
 
      Apply the regexp to the ``string`` and return a formatted string
     according to ``output``