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-03-17 19:21:01 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-17 19:21:01 +0300
commit9efaf18852fb076893e5a25aa624c0cba0316fa8 (patch)
treec03d23f3336fc1b5a7a64f86592882af4a40d193 /sphinx/search
parentd5e38b6e80ca3d3df86e3e16fbf455dcc9aa1fa1 (diff)
parentd97f41c0e3051a2634b50f4e9abd5e490345cab0 (diff)
Merge branch '1.7'
Diffstat (limited to 'sphinx/search')
-rw-r--r--sphinx/search/__init__.py4
-rw-r--r--sphinx/search/da.py5
-rw-r--r--sphinx/search/de.py5
-rw-r--r--sphinx/search/en.py5
-rw-r--r--sphinx/search/es.py5
-rw-r--r--sphinx/search/fi.py5
-rw-r--r--sphinx/search/fr.py5
-rw-r--r--sphinx/search/hu.py5
-rw-r--r--sphinx/search/it.py5
-rw-r--r--sphinx/search/ja.py4
-rw-r--r--sphinx/search/nl.py5
-rw-r--r--sphinx/search/no.py5
-rw-r--r--sphinx/search/pt.py5
-rw-r--r--sphinx/search/ro.py5
-rw-r--r--sphinx/search/ru.py5
-rw-r--r--sphinx/search/sv.py5
-rw-r--r--sphinx/search/tr.py5
-rw-r--r--sphinx/search/zh.py4
18 files changed, 36 insertions, 51 deletions
diff --git a/sphinx/search/__init__.py b/sphinx/search/__init__.py
index 58d98cdeb..fc55a2a45 100644
--- a/sphinx/search/__init__.py
+++ b/sphinx/search/__init__.py
@@ -10,7 +10,6 @@
"""
import re
from os import path
-from typing import TYPE_CHECKING
from six import iteritems, itervalues, text_type, string_types
from six.moves import cPickle as pickle
@@ -22,7 +21,8 @@ from sphinx.util import jsdump, rpartition
from sphinx.util.pycompat import htmlescape
from sphinx.search.jssplitter import splitter_code
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict, IO, Iterable, List, Tuple, Type, Set # NOQA
from docutils import nodes # NOQA
from sphinx.environment import BuildEnvironment # NOQA
diff --git a/sphinx/search/da.py b/sphinx/search/da.py
index 186219cca..26ac428fe 100644
--- a/sphinx/search/da.py
+++ b/sphinx/search/da.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/de.py b/sphinx/search/de.py
index 186e4ab08..00e36354b 100644
--- a/sphinx/search/de.py
+++ b/sphinx/search/de.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/en.py b/sphinx/search/en.py
index 8ba2b852d..fe9b7d8da 100644
--- a/sphinx/search/en.py
+++ b/sphinx/search/en.py
@@ -9,12 +9,11 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage
from sphinx.util.stemmer import get_stemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Dict # NOQA
english_stopwords = set(u"""
diff --git a/sphinx/search/es.py b/sphinx/search/es.py
index 48783feff..971d0c149 100644
--- a/sphinx/search/es.py
+++ b/sphinx/search/es.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/fi.py b/sphinx/search/fi.py
index 039035bd6..b2b47781e 100644
--- a/sphinx/search/fi.py
+++ b/sphinx/search/fi.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/fr.py b/sphinx/search/fr.py
index 0c42843ec..9976c1ca7 100644
--- a/sphinx/search/fr.py
+++ b/sphinx/search/fr.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/hu.py b/sphinx/search/hu.py
index c2abbd677..9cdee61fe 100644
--- a/sphinx/search/hu.py
+++ b/sphinx/search/hu.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/it.py b/sphinx/search/it.py
index 1a26c4488..db86e386e 100644
--- a/sphinx/search/it.py
+++ b/sphinx/search/it.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/ja.py b/sphinx/search/ja.py
index b400590f2..0cdc14a11 100644
--- a/sphinx/search/ja.py
+++ b/sphinx/search/ja.py
@@ -20,7 +20,6 @@
import os
import re
import sys
-from typing import TYPE_CHECKING
from six import iteritems, PY3
@@ -40,7 +39,8 @@ from sphinx.errors import SphinxError, ExtensionError
from sphinx.search import SearchLanguage
from sphinx.util import import_object
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any, Dict, List # NOQA
diff --git a/sphinx/search/nl.py b/sphinx/search/nl.py
index fc26bbd2f..49003d2d1 100644
--- a/sphinx/search/nl.py
+++ b/sphinx/search/nl.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/no.py b/sphinx/search/no.py
index d582cd02c..7f5a73858 100644
--- a/sphinx/search/no.py
+++ b/sphinx/search/no.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/pt.py b/sphinx/search/pt.py
index 1fd0b65c8..44c7e2118 100644
--- a/sphinx/search/pt.py
+++ b/sphinx/search/pt.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/ro.py b/sphinx/search/ro.py
index 0d9bc31ab..b4beced2d 100644
--- a/sphinx/search/ro.py
+++ b/sphinx/search/ro.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Dict, Set # NOQA
js_stemmer = u"""
diff --git a/sphinx/search/ru.py b/sphinx/search/ru.py
index 085569f20..b628b9866 100644
--- a/sphinx/search/ru.py
+++ b/sphinx/search/ru.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any # NOQA
diff --git a/sphinx/search/sv.py b/sphinx/search/sv.py
index f6d40feed..953ae94b5 100644
--- a/sphinx/search/sv.py
+++ b/sphinx/search/sv.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage, parse_stop_word
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Any
swedish_stopwords = parse_stop_word(u'''
diff --git a/sphinx/search/tr.py b/sphinx/search/tr.py
index e97779641..4ce42dd76 100644
--- a/sphinx/search/tr.py
+++ b/sphinx/search/tr.py
@@ -9,13 +9,12 @@
:license: BSD, see LICENSE for details.
"""
-from typing import TYPE_CHECKING
-
from sphinx.search import SearchLanguage
import snowballstemmer
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Dict, Set # NOQA
js_stemmer = u"""
diff --git a/sphinx/search/zh.py b/sphinx/search/zh.py
index 1ec2628e9..2301e1103 100644
--- a/sphinx/search/zh.py
+++ b/sphinx/search/zh.py
@@ -11,7 +11,6 @@
import os
import re
-from typing import TYPE_CHECKING
from sphinx.search import SearchLanguage
from sphinx.util.stemmer import get_stemmer
@@ -22,7 +21,8 @@ try:
except ImportError:
JIEBA = False
-if TYPE_CHECKING:
+if False:
+ # For type annotation
from typing import Dict, List # NOQA
english_stopwords = set(u"""