Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-14 21:14:11 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-12-15 17:57:43 +0300
commit6bc357140dbb074eb0d590c1226009f83f97862e (patch)
treea7c8d2087ee1f50dadb5ca78343ac10c6959b740 /sphinx/versioning.py
parent0031c9b4822ae9684888ae90bc70d6ceb3313581 (diff)
Replace all "unicode" type by "str"
Diffstat (limited to 'sphinx/versioning.py')
-rw-r--r--sphinx/versioning.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/versioning.py b/sphinx/versioning.py
index c2c83fb58..2c6569932 100644
--- a/sphinx/versioning.py
+++ b/sphinx/versioning.py
@@ -23,7 +23,6 @@ if False:
# For type annotation
from typing import Any, Iterator # NOQA
from docutils import nodes # NOQA
- from sphinx.util.typing import unicode # NOQA
try:
import Levenshtein
@@ -120,7 +119,7 @@ def merge_doctrees(old, new, condition):
def get_ratio(old, new):
- # type: (unicode, unicode) -> float
+ # type: (str, str) -> float
"""Return a "similiarity ratio" (in percent) representing the similarity
between the two strings where 0 is equal and anything above less than equal.
"""
@@ -134,7 +133,7 @@ def get_ratio(old, new):
def levenshtein_distance(a, b):
- # type: (unicode, unicode) -> int
+ # type: (str, str) -> int
"""Return the Levenshtein edit distance between two strings *a* and *b*."""
if a == b:
return 0