Sphinx 7.2.5__py3-none-any.whl → 7.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Sphinx might be problematic. Click here for more details.
- sphinx/__init__.py +8 -9
- sphinx/addnodes.py +31 -28
- sphinx/application.py +9 -15
- sphinx/builders/__init__.py +5 -6
- sphinx/builders/_epub_base.py +17 -9
- sphinx/builders/changes.py +10 -5
- sphinx/builders/dirhtml.py +4 -2
- sphinx/builders/dummy.py +3 -2
- sphinx/builders/epub3.py +5 -3
- sphinx/builders/gettext.py +24 -7
- sphinx/builders/html/__init__.py +88 -96
- sphinx/builders/html/_assets.py +16 -16
- sphinx/builders/html/transforms.py +4 -2
- sphinx/builders/latex/__init__.py +40 -33
- sphinx/builders/latex/nodes.py +6 -2
- sphinx/builders/latex/transforms.py +17 -8
- sphinx/builders/latex/util.py +1 -1
- sphinx/builders/linkcheck.py +86 -27
- sphinx/builders/manpage.py +8 -6
- sphinx/builders/singlehtml.py +5 -4
- sphinx/builders/texinfo.py +18 -14
- sphinx/builders/text.py +3 -2
- sphinx/builders/xml.py +5 -2
- sphinx/cmd/build.py +119 -76
- sphinx/cmd/make_mode.py +21 -20
- sphinx/cmd/quickstart.py +13 -16
- sphinx/config.py +432 -250
- sphinx/deprecation.py +23 -13
- sphinx/directives/__init__.py +8 -8
- sphinx/directives/code.py +7 -7
- sphinx/directives/other.py +23 -13
- sphinx/directives/patches.py +7 -6
- sphinx/domains/__init__.py +2 -2
- sphinx/domains/c/__init__.py +796 -0
- sphinx/domains/c/_ast.py +1421 -0
- sphinx/domains/c/_ids.py +65 -0
- sphinx/domains/c/_parser.py +1048 -0
- sphinx/domains/c/_symbol.py +700 -0
- sphinx/domains/changeset.py +11 -7
- sphinx/domains/citation.py +5 -2
- sphinx/domains/cpp/__init__.py +1089 -0
- sphinx/domains/cpp/_ast.py +3635 -0
- sphinx/domains/cpp/_ids.py +537 -0
- sphinx/domains/cpp/_parser.py +2117 -0
- sphinx/domains/cpp/_symbol.py +1092 -0
- sphinx/domains/index.py +6 -4
- sphinx/domains/javascript.py +16 -13
- sphinx/domains/math.py +9 -4
- sphinx/domains/python/__init__.py +890 -0
- sphinx/domains/python/_annotations.py +507 -0
- sphinx/domains/python/_object.py +426 -0
- sphinx/domains/rst.py +12 -7
- sphinx/domains/{std.py → std/__init__.py} +19 -16
- sphinx/environment/__init__.py +21 -19
- sphinx/environment/adapters/indexentries.py +2 -2
- sphinx/environment/adapters/toctree.py +10 -9
- sphinx/environment/collectors/__init__.py +6 -3
- sphinx/environment/collectors/asset.py +4 -3
- sphinx/environment/collectors/dependencies.py +3 -2
- sphinx/environment/collectors/metadata.py +6 -5
- sphinx/environment/collectors/title.py +3 -2
- sphinx/environment/collectors/toctree.py +5 -4
- sphinx/errors.py +13 -2
- sphinx/events.py +14 -9
- sphinx/ext/apidoc.py +9 -11
- sphinx/ext/autodoc/__init__.py +105 -71
- sphinx/ext/autodoc/directive.py +7 -6
- sphinx/ext/autodoc/importer.py +132 -52
- sphinx/ext/autodoc/mock.py +7 -5
- sphinx/ext/autodoc/preserve_defaults.py +4 -3
- sphinx/ext/autodoc/type_comment.py +2 -1
- sphinx/ext/autodoc/typehints.py +5 -4
- sphinx/ext/autosectionlabel.py +3 -2
- sphinx/ext/autosummary/__init__.py +21 -17
- sphinx/ext/autosummary/generate.py +9 -9
- sphinx/ext/coverage.py +26 -20
- sphinx/ext/doctest.py +38 -33
- sphinx/ext/duration.py +1 -0
- sphinx/ext/extlinks.py +4 -3
- sphinx/ext/githubpages.py +3 -2
- sphinx/ext/graphviz.py +10 -7
- sphinx/ext/ifconfig.py +5 -5
- sphinx/ext/imgconverter.py +6 -5
- sphinx/ext/imgmath.py +9 -8
- sphinx/ext/inheritance_diagram.py +31 -31
- sphinx/ext/intersphinx.py +140 -23
- sphinx/ext/linkcode.py +3 -2
- sphinx/ext/mathjax.py +2 -1
- sphinx/ext/napoleon/__init__.py +12 -7
- sphinx/ext/napoleon/docstring.py +34 -32
- sphinx/ext/todo.py +10 -7
- sphinx/ext/viewcode.py +12 -11
- sphinx/extension.py +18 -8
- sphinx/highlighting.py +39 -20
- sphinx/io.py +17 -8
- sphinx/jinja2glue.py +16 -15
- sphinx/locale/__init__.py +30 -23
- sphinx/locale/ar/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ar/LC_MESSAGES/sphinx.po +818 -761
- sphinx/locale/bg/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bg/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/bn/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/bn/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/ca/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ca/LC_MESSAGES/sphinx.po +864 -807
- sphinx/locale/cak/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cak/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/cs/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cs/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/cy/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/cy/LC_MESSAGES/sphinx.po +819 -762
- sphinx/locale/da/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/da/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/de_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/el/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/el/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_DE/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_GB/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/en_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/eo/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eo/LC_MESSAGES/sphinx.po +820 -763
- sphinx/locale/es/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es/LC_MESSAGES/sphinx.po +856 -799
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/es_CO/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/et/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/et/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/eu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/eu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/fa/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fa/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/fi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fi/LC_MESSAGES/sphinx.po +816 -759
- sphinx/locale/fr/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/fr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr/LC_MESSAGES/sphinx.po +904 -847
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/fr_FR/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/gl/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/gl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/gl/LC_MESSAGES/sphinx.po +1506 -1449
- sphinx/locale/he/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/he/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/he/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/hi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hi_IN/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/hr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hr/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/hu/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/hu/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/id/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/id/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/is/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/is/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/it/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/it/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ja/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ja/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/ka/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ka/LC_MESSAGES/sphinx.po +848 -791
- sphinx/locale/ko/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ko/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/lt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lt/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/lv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/lv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/mk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/mk/LC_MESSAGES/sphinx.po +825 -768
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.js +27 -27
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nb_NO/LC_MESSAGES/sphinx.po +876 -818
- sphinx/locale/ne/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ne/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/nl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/nl/LC_MESSAGES/sphinx.po +844 -787
- sphinx/locale/pl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pl/LC_MESSAGES/sphinx.po +845 -788
- sphinx/locale/pt/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_BR/LC_MESSAGES/sphinx.po +908 -851
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/pt_PT/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ro/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ro/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ru/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ru/LC_MESSAGES/sphinx.po +838 -781
- sphinx/locale/si/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/si/LC_MESSAGES/sphinx.po +823 -766
- sphinx/locale/sk/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sk/LC_MESSAGES/sphinx.po +854 -797
- sphinx/locale/sl/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sl/LC_MESSAGES/sphinx.po +832 -775
- sphinx/locale/sphinx.pot +813 -755
- sphinx/locale/sq/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/sq/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sq/LC_MESSAGES/sphinx.po +865 -808
- sphinx/locale/sr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr/LC_MESSAGES/sphinx.po +835 -778
- sphinx/locale/sr@latin/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sr_RS/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/sv/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/ta/LC_MESSAGES/sphinx.js +54 -54
- sphinx/locale/ta/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ta/LC_MESSAGES/sphinx.po +1530 -1473
- sphinx/locale/te/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/te/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/tr/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/tr/LC_MESSAGES/sphinx.po +853 -796
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/uk_UA/LC_MESSAGES/sphinx.po +833 -776
- sphinx/locale/ur/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/ur/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/vi/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/vi/LC_MESSAGES/sphinx.po +837 -780
- sphinx/locale/yue/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/yue/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_CN/LC_MESSAGES/sphinx.po +855 -798
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_HK/LC_MESSAGES/sphinx.po +811 -754
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.js +1 -1
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW/LC_MESSAGES/sphinx.po +879 -822
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.mo +0 -0
- sphinx/locale/zh_TW.Big5/LC_MESSAGES/sphinx.po +811 -754
- sphinx/parsers.py +7 -5
- sphinx/project.py +18 -11
- sphinx/pycode/__init__.py +6 -5
- sphinx/pycode/ast.py +23 -8
- sphinx/pycode/parser.py +6 -5
- sphinx/registry.py +12 -6
- sphinx/roles.py +103 -57
- sphinx/search/__init__.py +17 -18
- sphinx/search/da.py +2 -2
- sphinx/search/de.py +2 -2
- sphinx/search/en.py +1 -1
- sphinx/search/es.py +2 -2
- sphinx/search/fi.py +2 -2
- sphinx/search/fr.py +2 -2
- sphinx/search/hu.py +2 -2
- sphinx/search/it.py +2 -2
- sphinx/search/ja.py +13 -22
- sphinx/search/nl.py +2 -2
- sphinx/search/no.py +2 -2
- sphinx/search/pt.py +2 -2
- sphinx/search/ro.py +1 -1
- sphinx/search/ru.py +2 -2
- sphinx/search/sv.py +2 -2
- sphinx/search/tr.py +1 -1
- sphinx/search/zh.py +2 -3
- sphinx/templates/graphviz/graphviz.css +1 -1
- sphinx/testing/fixtures.py +41 -24
- sphinx/testing/path.py +1 -1
- sphinx/testing/util.py +142 -53
- sphinx/texinputs/sphinx.xdy +1 -1
- sphinx/texinputs/sphinxlatextables.sty +1 -1
- sphinx/texinputs/sphinxpackagesubstitutefont.sty +21 -0
- sphinx/themes/agogo/layout.html +4 -4
- sphinx/themes/agogo/static/agogo.css_t +1 -1
- sphinx/themes/agogo/theme.toml +22 -0
- sphinx/themes/basic/defindex.html +1 -1
- sphinx/themes/basic/domainindex.html +1 -1
- sphinx/themes/basic/genindex-single.html +1 -1
- sphinx/themes/basic/genindex-split.html +1 -1
- sphinx/themes/basic/genindex.html +1 -1
- sphinx/themes/basic/globaltoc.html +1 -1
- sphinx/themes/basic/layout.html +1 -1
- sphinx/themes/basic/localtoc.html +1 -1
- sphinx/themes/basic/page.html +1 -1
- sphinx/themes/basic/relations.html +1 -1
- sphinx/themes/basic/search.html +5 -20
- sphinx/themes/basic/searchbox.html +3 -3
- sphinx/themes/basic/searchfield.html +3 -3
- sphinx/themes/basic/sourcelink.html +1 -1
- sphinx/themes/basic/static/basic.css_t +1 -1
- sphinx/themes/basic/static/doctools.js +1 -1
- sphinx/themes/basic/static/language_data.js_t +2 -2
- sphinx/themes/basic/static/searchtools.js +105 -60
- sphinx/themes/basic/theme.toml +23 -0
- sphinx/themes/bizstyle/layout.html +1 -6
- sphinx/themes/bizstyle/static/bizstyle.css_t +1 -1
- sphinx/themes/bizstyle/static/bizstyle.js_t +1 -1
- sphinx/themes/bizstyle/static/css3-mediaqueries_src.js +3 -3
- sphinx/themes/bizstyle/theme.toml +12 -0
- sphinx/themes/classic/layout.html +1 -1
- sphinx/themes/classic/static/classic.css_t +1 -1
- sphinx/themes/classic/static/sidebar.js_t +1 -1
- sphinx/themes/classic/theme.toml +34 -0
- sphinx/themes/default/theme.toml +2 -0
- sphinx/themes/epub/epub-cover.html +1 -1
- sphinx/themes/epub/layout.html +1 -1
- sphinx/themes/epub/static/epub.css_t +1 -1
- sphinx/themes/epub/theme.toml +10 -0
- sphinx/themes/haiku/layout.html +3 -3
- sphinx/themes/haiku/static/haiku.css_t +2 -2
- sphinx/themes/haiku/theme.toml +16 -0
- sphinx/themes/nature/static/nature.css_t +1 -1
- sphinx/themes/nature/theme.toml +6 -0
- sphinx/themes/nonav/layout.html +1 -1
- sphinx/themes/nonav/static/nonav.css_t +1 -1
- sphinx/themes/nonav/theme.toml +10 -0
- sphinx/themes/pyramid/static/epub.css_t +1 -1
- sphinx/themes/pyramid/static/pyramid.css_t +1 -1
- sphinx/themes/pyramid/theme.toml +6 -0
- sphinx/themes/scrolls/artwork/logo.svg +1 -1
- sphinx/themes/scrolls/layout.html +2 -2
- sphinx/themes/scrolls/static/scrolls.css_t +1 -1
- sphinx/themes/scrolls/theme.toml +15 -0
- sphinx/themes/sphinxdoc/static/sphinxdoc.css_t +1 -1
- sphinx/themes/sphinxdoc/theme.toml +6 -0
- sphinx/themes/traditional/static/traditional.css_t +1 -1
- sphinx/themes/traditional/theme.toml +9 -0
- sphinx/theming.py +427 -131
- sphinx/transforms/__init__.py +21 -24
- sphinx/transforms/compact_bullet_list.py +5 -5
- sphinx/transforms/i18n.py +30 -28
- sphinx/transforms/post_transforms/__init__.py +9 -7
- sphinx/transforms/post_transforms/code.py +4 -1
- sphinx/transforms/post_transforms/images.py +17 -13
- sphinx/transforms/references.py +3 -1
- sphinx/util/__init__.py +15 -11
- sphinx/util/_io.py +34 -0
- sphinx/util/_pathlib.py +23 -18
- sphinx/util/build_phase.py +1 -0
- sphinx/util/cfamily.py +19 -11
- sphinx/util/console.py +101 -21
- sphinx/util/display.py +3 -2
- sphinx/util/docfields.py +12 -8
- sphinx/util/docutils.py +21 -35
- sphinx/util/exceptions.py +3 -2
- sphinx/util/fileutil.py +5 -5
- sphinx/util/http_date.py +9 -2
- sphinx/util/i18n.py +40 -9
- sphinx/util/inspect.py +317 -245
- sphinx/util/inventory.py +22 -5
- sphinx/util/logging.py +81 -7
- sphinx/util/matching.py +2 -1
- sphinx/util/math.py +1 -2
- sphinx/util/nodes.py +39 -29
- sphinx/util/osutil.py +25 -6
- sphinx/util/parallel.py +6 -1
- sphinx/util/requests.py +8 -5
- sphinx/util/rst.py +8 -6
- sphinx/util/tags.py +3 -3
- sphinx/util/template.py +8 -3
- sphinx/util/typing.py +76 -42
- sphinx/versioning.py +6 -2
- sphinx/writers/html.py +1 -1
- sphinx/writers/html5.py +17 -13
- sphinx/writers/latex.py +12 -12
- sphinx/writers/manpage.py +13 -7
- sphinx/writers/texinfo.py +13 -10
- sphinx/writers/text.py +13 -23
- sphinx/writers/xml.py +1 -1
- sphinx-7.2.5.dist-info/LICENSE → sphinx-7.3.0.dist-info/LICENSE.rst +1 -1
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/METADATA +13 -12
- sphinx-7.3.0.dist-info/RECORD +581 -0
- sphinx/domains/c.py +0 -3906
- sphinx/domains/cpp.py +0 -8233
- sphinx/domains/python.py +0 -1769
- sphinx/themes/agogo/theme.conf +0 -20
- sphinx/themes/basic/theme.conf +0 -16
- sphinx/themes/bizstyle/theme.conf +0 -10
- sphinx/themes/classic/theme.conf +0 -32
- sphinx/themes/default/theme.conf +0 -2
- sphinx/themes/epub/theme.conf +0 -8
- sphinx/themes/haiku/theme.conf +0 -14
- sphinx/themes/nature/theme.conf +0 -4
- sphinx/themes/nonav/theme.conf +0 -8
- sphinx/themes/pyramid/theme.conf +0 -4
- sphinx/themes/scrolls/theme.conf +0 -13
- sphinx/themes/sphinxdoc/theme.conf +0 -4
- sphinx/themes/traditional/theme.conf +0 -7
- sphinx-7.2.5.dist-info/RECORD +0 -569
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/WHEEL +0 -0
- {sphinx-7.2.5.dist-info → sphinx-7.3.0.dist-info}/entry_points.txt +0 -0
sphinx/search/__init__.py
CHANGED
|
@@ -70,11 +70,11 @@ var Stemmer = function() {
|
|
|
70
70
|
|
|
71
71
|
_word_re = re.compile(r'\w+')
|
|
72
72
|
|
|
73
|
-
def __init__(self, options: dict) -> None:
|
|
73
|
+
def __init__(self, options: dict[str, str]) -> None:
|
|
74
74
|
self.options = options
|
|
75
75
|
self.init(options)
|
|
76
76
|
|
|
77
|
-
def init(self, options: dict) -> None:
|
|
77
|
+
def init(self, options: dict[str, str]) -> None:
|
|
78
78
|
"""
|
|
79
79
|
Initialize the class with the options the user has given.
|
|
80
80
|
"""
|
|
@@ -121,7 +121,7 @@ def parse_stop_word(source: str) -> set[str]:
|
|
|
121
121
|
"""
|
|
122
122
|
Parse snowball style word list like this:
|
|
123
123
|
|
|
124
|
-
*
|
|
124
|
+
* https://snowball.tartarus.org/algorithms/finnish/stop.txt
|
|
125
125
|
"""
|
|
126
126
|
result: set[str] = set()
|
|
127
127
|
for line in source.splitlines():
|
|
@@ -162,7 +162,7 @@ class _JavaScriptIndex:
|
|
|
162
162
|
SUFFIX = ')'
|
|
163
163
|
|
|
164
164
|
def dumps(self, data: Any) -> str:
|
|
165
|
-
return self.PREFIX + json.dumps(data) + self.SUFFIX
|
|
165
|
+
return self.PREFIX + json.dumps(data, sort_keys=True) + self.SUFFIX
|
|
166
166
|
|
|
167
167
|
def loads(self, s: str) -> Any:
|
|
168
168
|
data = s[len(self.PREFIX):-len(self.SUFFIX)]
|
|
@@ -171,10 +171,10 @@ class _JavaScriptIndex:
|
|
|
171
171
|
raise ValueError('invalid data')
|
|
172
172
|
return json.loads(data)
|
|
173
173
|
|
|
174
|
-
def dump(self, data: Any, f: IO) -> None:
|
|
174
|
+
def dump(self, data: Any, f: IO[str]) -> None:
|
|
175
175
|
f.write(self.dumps(data))
|
|
176
176
|
|
|
177
|
-
def load(self, f: IO) -> Any:
|
|
177
|
+
def load(self, f: IO[str]) -> Any:
|
|
178
178
|
return self.loads(f.read())
|
|
179
179
|
|
|
180
180
|
|
|
@@ -182,7 +182,7 @@ js_index = _JavaScriptIndex()
|
|
|
182
182
|
|
|
183
183
|
|
|
184
184
|
def _is_meta_keywords(
|
|
185
|
-
node: nodes.meta,
|
|
185
|
+
node: nodes.meta,
|
|
186
186
|
lang: str | None,
|
|
187
187
|
) -> bool:
|
|
188
188
|
if node.get('name') == 'keywords':
|
|
@@ -234,7 +234,7 @@ class WordCollector(nodes.NodeVisitor):
|
|
|
234
234
|
ids = node.parent['ids']
|
|
235
235
|
self.found_titles.append((title, ids[0] if ids else None))
|
|
236
236
|
self.found_title_words.extend(self.lang.split(title))
|
|
237
|
-
elif isinstance(node, Element) and _is_meta_keywords(node, self.lang.lang):
|
|
237
|
+
elif isinstance(node, Element) and _is_meta_keywords(node, self.lang.lang): # type: ignore[arg-type]
|
|
238
238
|
keywords = node['content']
|
|
239
239
|
keywords = [keyword.strip() for keyword in keywords.split(',')]
|
|
240
240
|
self.found_words.extend(keywords)
|
|
@@ -250,7 +250,7 @@ class IndexBuilder:
|
|
|
250
250
|
'pickle': pickle
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
def __init__(self, env: BuildEnvironment, lang: str, options: dict, scoring: str) -> None:
|
|
253
|
+
def __init__(self, env: BuildEnvironment, lang: str, options: dict[str, str], scoring: str) -> None:
|
|
254
254
|
self.env = env
|
|
255
255
|
# docname -> title
|
|
256
256
|
self._titles: dict[str, str] = env._search_index_titles
|
|
@@ -368,8 +368,8 @@ class IndexBuilder:
|
|
|
368
368
|
plist.append((fn2index[docname], typeindex, prio, shortanchor, name))
|
|
369
369
|
return rv
|
|
370
370
|
|
|
371
|
-
def get_terms(self, fn2index: dict) -> tuple[dict[str, list[
|
|
372
|
-
rvs: tuple[dict[str, list[
|
|
371
|
+
def get_terms(self, fn2index: dict[str, int]) -> tuple[dict[str, list[int] | int], dict[str, list[int] | int]]:
|
|
372
|
+
rvs: tuple[dict[str, list[int] | int], dict[str, list[int] | int]] = ({}, {})
|
|
373
373
|
for rv, mapping in zip(rvs, (self._mapping, self._title_mapping)):
|
|
374
374
|
for k, v in mapping.items():
|
|
375
375
|
if len(v) == 1:
|
|
@@ -377,7 +377,7 @@ class IndexBuilder:
|
|
|
377
377
|
if fn in fn2index:
|
|
378
378
|
rv[k] = fn2index[fn]
|
|
379
379
|
else:
|
|
380
|
-
rv[k] = sorted(
|
|
380
|
+
rv[k] = sorted(fn2index[fn] for fn in v if fn in fn2index)
|
|
381
381
|
return rvs
|
|
382
382
|
|
|
383
383
|
def freeze(self) -> dict[str, Any]:
|
|
@@ -392,14 +392,14 @@ class IndexBuilder:
|
|
|
392
392
|
objnames = self._objnames
|
|
393
393
|
|
|
394
394
|
alltitles: dict[str, list[tuple[int, str]]] = {}
|
|
395
|
-
for docname, titlelist in self._all_titles.items():
|
|
395
|
+
for docname, titlelist in sorted(self._all_titles.items()):
|
|
396
396
|
for title, titleid in titlelist:
|
|
397
397
|
alltitles.setdefault(title, []).append((fn2index[docname], titleid))
|
|
398
398
|
|
|
399
|
-
index_entries: dict[str, list[tuple[int, str]]] = {}
|
|
399
|
+
index_entries: dict[str, list[tuple[int, str, bool]]] = {}
|
|
400
400
|
for docname, entries in self._index_entries.items():
|
|
401
401
|
for entry, entry_id, main_entry in entries:
|
|
402
|
-
index_entries.setdefault(entry.lower(), []).append((fn2index[docname], entry_id))
|
|
402
|
+
index_entries.setdefault(entry.lower(), []).append((fn2index[docname], entry_id, main_entry == "main"))
|
|
403
403
|
|
|
404
404
|
return dict(docnames=docnames, filenames=filenames, titles=titles, terms=terms,
|
|
405
405
|
objects=objects, objtypes=objtypes, objnames=objnames,
|
|
@@ -438,7 +438,7 @@ class IndexBuilder:
|
|
|
438
438
|
_stem = self.lang.stem
|
|
439
439
|
|
|
440
440
|
# memoise self.lang.stem
|
|
441
|
-
@functools.
|
|
441
|
+
@functools.cache
|
|
442
442
|
def stem(word_to_stem: str) -> str:
|
|
443
443
|
return _stem(word_to_stem).lower()
|
|
444
444
|
|
|
@@ -495,7 +495,7 @@ class IndexBuilder:
|
|
|
495
495
|
nodetext = re.sub(r'<[^<]+?>', '', nodetext)
|
|
496
496
|
word_store.words.extend(split(nodetext))
|
|
497
497
|
return
|
|
498
|
-
elif (isinstance(node, nodes.meta)
|
|
498
|
+
elif (isinstance(node, nodes.meta)
|
|
499
499
|
and _is_meta_keywords(node, language)):
|
|
500
500
|
keywords = [keyword.strip() for keyword in node['content'].split(',')]
|
|
501
501
|
word_store.words.extend(keywords)
|
|
@@ -508,7 +508,6 @@ class IndexBuilder:
|
|
|
508
508
|
word_store.title_words.extend(split(title))
|
|
509
509
|
for child in node.children:
|
|
510
510
|
_visit_nodes(child)
|
|
511
|
-
return
|
|
512
511
|
|
|
513
512
|
word_store = WordStore()
|
|
514
513
|
split = self.lang.split
|
sphinx/search/da.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
danish_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/danish/stop.txt
|
|
13
13
|
og | and
|
|
14
14
|
i | in
|
|
15
15
|
jeg | I
|
|
@@ -113,7 +113,7 @@ class SearchDanish(SearchLanguage):
|
|
|
113
113
|
js_stemmer_rawcode = 'danish-stemmer.js'
|
|
114
114
|
stopwords = danish_stopwords
|
|
115
115
|
|
|
116
|
-
def init(self, options: dict) -> None:
|
|
116
|
+
def init(self, options: dict[str, str]) -> None:
|
|
117
117
|
self.stemmer = snowballstemmer.stemmer('danish')
|
|
118
118
|
|
|
119
119
|
def stem(self, word: str) -> str:
|
sphinx/search/de.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
german_stopwords = parse_stop_word('''
|
|
12
|
-
|source:
|
|
12
|
+
|source: https://snowball.tartarus.org/algorithms/german/stop.txt
|
|
13
13
|
aber | but
|
|
14
14
|
|
|
15
15
|
alle | all
|
|
@@ -296,7 +296,7 @@ class SearchGerman(SearchLanguage):
|
|
|
296
296
|
js_stemmer_rawcode = 'german-stemmer.js'
|
|
297
297
|
stopwords = german_stopwords
|
|
298
298
|
|
|
299
|
-
def init(self, options: dict) -> None:
|
|
299
|
+
def init(self, options: dict[str, str]) -> None:
|
|
300
300
|
self.stemmer = snowballstemmer.stemmer('german')
|
|
301
301
|
|
|
302
302
|
def stem(self, word: str) -> str:
|
sphinx/search/en.py
CHANGED
|
@@ -213,7 +213,7 @@ class SearchEnglish(SearchLanguage):
|
|
|
213
213
|
js_stemmer_code = js_porter_stemmer
|
|
214
214
|
stopwords = english_stopwords
|
|
215
215
|
|
|
216
|
-
def init(self, options: dict) -> None:
|
|
216
|
+
def init(self, options: dict[str, str]) -> None:
|
|
217
217
|
self.stemmer = snowballstemmer.stemmer('porter')
|
|
218
218
|
|
|
219
219
|
def stem(self, word: str) -> str:
|
sphinx/search/es.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
spanish_stopwords = parse_stop_word('''
|
|
12
|
-
|source:
|
|
12
|
+
|source: https://snowball.tartarus.org/algorithms/spanish/stop.txt
|
|
13
13
|
de | from, of
|
|
14
14
|
la | the, her
|
|
15
15
|
que | who, that
|
|
@@ -356,7 +356,7 @@ class SearchSpanish(SearchLanguage):
|
|
|
356
356
|
js_stemmer_rawcode = 'spanish-stemmer.js'
|
|
357
357
|
stopwords = spanish_stopwords
|
|
358
358
|
|
|
359
|
-
def init(self, options: dict) -> None:
|
|
359
|
+
def init(self, options: dict[str, str]) -> None:
|
|
360
360
|
self.stemmer = snowballstemmer.stemmer('spanish')
|
|
361
361
|
|
|
362
362
|
def stem(self, word: str) -> str:
|
sphinx/search/fi.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
finnish_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/finnish/stop.txt
|
|
13
13
|
| forms of BE
|
|
14
14
|
|
|
15
15
|
olla
|
|
@@ -106,7 +106,7 @@ class SearchFinnish(SearchLanguage):
|
|
|
106
106
|
js_stemmer_rawcode = 'finnish-stemmer.js'
|
|
107
107
|
stopwords = finnish_stopwords
|
|
108
108
|
|
|
109
|
-
def init(self, options: dict) -> None:
|
|
109
|
+
def init(self, options: dict[str, str]) -> None:
|
|
110
110
|
self.stemmer = snowballstemmer.stemmer('finnish')
|
|
111
111
|
|
|
112
112
|
def stem(self, word: str) -> str:
|
sphinx/search/fr.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
french_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/french/stop.txt
|
|
13
13
|
au | a + le
|
|
14
14
|
aux | a + les
|
|
15
15
|
avec | with
|
|
@@ -192,7 +192,7 @@ class SearchFrench(SearchLanguage):
|
|
|
192
192
|
js_stemmer_rawcode = 'french-stemmer.js'
|
|
193
193
|
stopwords = french_stopwords
|
|
194
194
|
|
|
195
|
-
def init(self, options: dict) -> None:
|
|
195
|
+
def init(self, options: dict[str, str]) -> None:
|
|
196
196
|
self.stemmer = snowballstemmer.stemmer('french')
|
|
197
197
|
|
|
198
198
|
def stem(self, word: str) -> str:
|
sphinx/search/hu.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
hungarian_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/hungarian/stop.txt
|
|
13
13
|
| prepared by Anna Tordai
|
|
14
14
|
a
|
|
15
15
|
ahogy
|
|
@@ -219,7 +219,7 @@ class SearchHungarian(SearchLanguage):
|
|
|
219
219
|
js_stemmer_rawcode = 'hungarian-stemmer.js'
|
|
220
220
|
stopwords = hungarian_stopwords
|
|
221
221
|
|
|
222
|
-
def init(self, options: dict) -> None:
|
|
222
|
+
def init(self, options: dict[str, str]) -> None:
|
|
223
223
|
self.stemmer = snowballstemmer.stemmer('hungarian')
|
|
224
224
|
|
|
225
225
|
def stem(self, word: str) -> str:
|
sphinx/search/it.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
italian_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/italian/stop.txt
|
|
13
13
|
ad | a (to) before vowel
|
|
14
14
|
al | a + il
|
|
15
15
|
allo | a + lo
|
|
@@ -309,7 +309,7 @@ class SearchItalian(SearchLanguage):
|
|
|
309
309
|
js_stemmer_rawcode = 'italian-stemmer.js'
|
|
310
310
|
stopwords = italian_stopwords
|
|
311
311
|
|
|
312
|
-
def init(self, options: dict) -> None:
|
|
312
|
+
def init(self, options: dict[str, str]) -> None:
|
|
313
313
|
self.stemmer = snowballstemmer.stemmer('italian')
|
|
314
314
|
|
|
315
315
|
def stem(self, word: str) -> str:
|
sphinx/search/ja.py
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
"""Japanese search language: includes routine to split words."""
|
|
2
2
|
|
|
3
3
|
# Python Version of TinySegmenter
|
|
4
|
-
# (
|
|
4
|
+
# (https://chasen.org/~taku/software/TinySegmenter/)
|
|
5
5
|
# TinySegmenter is super compact Japanese tokenizer.
|
|
6
6
|
#
|
|
7
7
|
# TinySegmenter was originally developed by Taku Kudo <taku(at)chasen.org>.
|
|
8
8
|
# Python Version was developed by xnights <programming.magic(at)gmail.com>.
|
|
9
|
-
# For details, see
|
|
9
|
+
# For details, see https://programming-magic.com/?id=170
|
|
10
10
|
|
|
11
11
|
from __future__ import annotations
|
|
12
12
|
|
|
13
13
|
import os
|
|
14
14
|
import re
|
|
15
15
|
import sys
|
|
16
|
-
from typing import
|
|
16
|
+
from typing import Any
|
|
17
17
|
|
|
18
18
|
try:
|
|
19
|
-
import MeCab
|
|
19
|
+
import MeCab # type: ignore[import-not-found]
|
|
20
20
|
native_module = True
|
|
21
21
|
except ImportError:
|
|
22
22
|
native_module = False
|
|
23
23
|
|
|
24
24
|
try:
|
|
25
|
-
import janome.tokenizer
|
|
25
|
+
import janome.tokenizer # type: ignore[import-not-found]
|
|
26
26
|
janome_module = True
|
|
27
27
|
except ImportError:
|
|
28
28
|
janome_module = False
|
|
@@ -33,7 +33,7 @@ from sphinx.util import import_object
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
class BaseSplitter:
|
|
36
|
-
def __init__(self, options: dict) -> None:
|
|
36
|
+
def __init__(self, options: dict[str, str]) -> None:
|
|
37
37
|
self.options = options
|
|
38
38
|
|
|
39
39
|
def split(self, input: str) -> list[str]:
|
|
@@ -46,7 +46,7 @@ class BaseSplitter:
|
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
class MecabSplitter(BaseSplitter):
|
|
49
|
-
def __init__(self, options: dict) -> None:
|
|
49
|
+
def __init__(self, options: dict[str, str]) -> None:
|
|
50
50
|
super().__init__(options)
|
|
51
51
|
self.ctypes_libmecab: Any = None
|
|
52
52
|
self.ctypes_mecab: Any = None
|
|
@@ -64,14 +64,14 @@ class MecabSplitter(BaseSplitter):
|
|
|
64
64
|
self.ctypes_mecab, input.encode(self.dict_encode))
|
|
65
65
|
return result.split(' ')
|
|
66
66
|
|
|
67
|
-
def init_native(self, options: dict) -> None:
|
|
67
|
+
def init_native(self, options: dict[str, str]) -> None:
|
|
68
68
|
param = '-Owakati'
|
|
69
69
|
dict = options.get('dict')
|
|
70
70
|
if dict:
|
|
71
71
|
param += ' -d %s' % dict
|
|
72
72
|
self.native = MeCab.Tagger(param)
|
|
73
73
|
|
|
74
|
-
def init_ctypes(self, options: dict) -> None:
|
|
74
|
+
def init_ctypes(self, options: dict[str, str]) -> None:
|
|
75
75
|
import ctypes.util
|
|
76
76
|
|
|
77
77
|
lib = options.get('lib')
|
|
@@ -113,7 +113,7 @@ class MecabSplitter(BaseSplitter):
|
|
|
113
113
|
|
|
114
114
|
|
|
115
115
|
class JanomeSplitter(BaseSplitter):
|
|
116
|
-
def __init__(self, options: dict) -> None:
|
|
116
|
+
def __init__(self, options: dict[str, str]) -> None:
|
|
117
117
|
super().__init__(options)
|
|
118
118
|
self.user_dict = options.get('user_dic')
|
|
119
119
|
self.user_dict_enc = options.get('user_dic_enc', 'utf8')
|
|
@@ -418,17 +418,8 @@ class DefaultSplitter(BaseSplitter):
|
|
|
418
418
|
return []
|
|
419
419
|
|
|
420
420
|
result = []
|
|
421
|
-
seg = ['B3', 'B2', 'B1']
|
|
422
|
-
ctype = ['O', 'O', 'O']
|
|
423
|
-
for t in input:
|
|
424
|
-
seg.append(t)
|
|
425
|
-
ctype.append(self.ctype_(t))
|
|
426
|
-
seg.append('E1')
|
|
427
|
-
seg.append('E2')
|
|
428
|
-
seg.append('E3')
|
|
429
|
-
ctype.append('O')
|
|
430
|
-
ctype.append('O')
|
|
431
|
-
ctype.append('O')
|
|
421
|
+
seg = ['B3', 'B2', 'B1', *input, 'E1', 'E2', 'E3']
|
|
422
|
+
ctype = ['O', 'O', 'O', *map(self.ctype_, input), 'O', 'O', 'O']
|
|
432
423
|
word = seg[3]
|
|
433
424
|
p1 = 'U'
|
|
434
425
|
p2 = 'U'
|
|
@@ -513,7 +504,7 @@ class SearchJapanese(SearchLanguage):
|
|
|
513
504
|
lang = 'ja'
|
|
514
505
|
language_name = 'Japanese'
|
|
515
506
|
|
|
516
|
-
def init(self, options: dict) -> None:
|
|
507
|
+
def init(self, options: dict[str, str]) -> None:
|
|
517
508
|
dotted_path = options.get('type', 'sphinx.search.ja.DefaultSplitter')
|
|
518
509
|
try:
|
|
519
510
|
self.splitter = import_object(dotted_path)(options)
|
sphinx/search/nl.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
dutch_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/dutch/stop.txt
|
|
13
13
|
de | the
|
|
14
14
|
en | and
|
|
15
15
|
van | of, from
|
|
@@ -120,7 +120,7 @@ class SearchDutch(SearchLanguage):
|
|
|
120
120
|
js_stemmer_rawcode = 'dutch-stemmer.js'
|
|
121
121
|
stopwords = dutch_stopwords
|
|
122
122
|
|
|
123
|
-
def init(self, options: dict) -> None:
|
|
123
|
+
def init(self, options: dict[str, str]) -> None:
|
|
124
124
|
self.stemmer = snowballstemmer.stemmer('dutch')
|
|
125
125
|
|
|
126
126
|
def stem(self, word: str) -> str:
|
sphinx/search/no.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
norwegian_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/norwegian/stop.txt
|
|
13
13
|
og | and
|
|
14
14
|
i | in
|
|
15
15
|
jeg | I
|
|
@@ -195,7 +195,7 @@ class SearchNorwegian(SearchLanguage):
|
|
|
195
195
|
js_stemmer_rawcode = 'norwegian-stemmer.js'
|
|
196
196
|
stopwords = norwegian_stopwords
|
|
197
197
|
|
|
198
|
-
def init(self, options: dict) -> None:
|
|
198
|
+
def init(self, options: dict[str, str]) -> None:
|
|
199
199
|
self.stemmer = snowballstemmer.stemmer('norwegian')
|
|
200
200
|
|
|
201
201
|
def stem(self, word: str) -> str:
|
sphinx/search/pt.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
portuguese_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/portuguese/stop.txt
|
|
13
13
|
de | of, from
|
|
14
14
|
a | the; to, at; her
|
|
15
15
|
o | the; him
|
|
@@ -254,7 +254,7 @@ class SearchPortuguese(SearchLanguage):
|
|
|
254
254
|
js_stemmer_rawcode = 'portuguese-stemmer.js'
|
|
255
255
|
stopwords = portuguese_stopwords
|
|
256
256
|
|
|
257
|
-
def init(self, options: dict) -> None:
|
|
257
|
+
def init(self, options: dict[str, str]) -> None:
|
|
258
258
|
self.stemmer = snowballstemmer.stemmer('portuguese')
|
|
259
259
|
|
|
260
260
|
def stem(self, word: str) -> str:
|
sphinx/search/ro.py
CHANGED
|
@@ -15,7 +15,7 @@ class SearchRomanian(SearchLanguage):
|
|
|
15
15
|
js_stemmer_rawcode = 'romanian-stemmer.js'
|
|
16
16
|
stopwords: set[str] = set()
|
|
17
17
|
|
|
18
|
-
def init(self, options: dict) -> None:
|
|
18
|
+
def init(self, options: dict[str, str]) -> None:
|
|
19
19
|
self.stemmer = snowballstemmer.stemmer('romanian')
|
|
20
20
|
|
|
21
21
|
def stem(self, word: str) -> str:
|
sphinx/search/ru.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
russian_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/russian/stop.txt
|
|
13
13
|
и | and
|
|
14
14
|
в | in/into
|
|
15
15
|
во | alternative form
|
|
@@ -244,7 +244,7 @@ class SearchRussian(SearchLanguage):
|
|
|
244
244
|
js_stemmer_rawcode = 'russian-stemmer.js'
|
|
245
245
|
stopwords = russian_stopwords
|
|
246
246
|
|
|
247
|
-
def init(self, options: dict) -> None:
|
|
247
|
+
def init(self, options: dict[str, str]) -> None:
|
|
248
248
|
self.stemmer = snowballstemmer.stemmer('russian')
|
|
249
249
|
|
|
250
250
|
def stem(self, word: str) -> str:
|
sphinx/search/sv.py
CHANGED
|
@@ -9,7 +9,7 @@ import snowballstemmer
|
|
|
9
9
|
from sphinx.search import SearchLanguage, parse_stop_word
|
|
10
10
|
|
|
11
11
|
swedish_stopwords = parse_stop_word('''
|
|
12
|
-
| source:
|
|
12
|
+
| source: https://snowball.tartarus.org/algorithms/swedish/stop.txt
|
|
13
13
|
och | and
|
|
14
14
|
det | it, this/that
|
|
15
15
|
att | to (with infinitive)
|
|
@@ -133,7 +133,7 @@ class SearchSwedish(SearchLanguage):
|
|
|
133
133
|
js_stemmer_rawcode = 'swedish-stemmer.js'
|
|
134
134
|
stopwords = swedish_stopwords
|
|
135
135
|
|
|
136
|
-
def init(self, options: dict) -> None:
|
|
136
|
+
def init(self, options: dict[str, str]) -> None:
|
|
137
137
|
self.stemmer = snowballstemmer.stemmer('swedish')
|
|
138
138
|
|
|
139
139
|
def stem(self, word: str) -> str:
|
sphinx/search/tr.py
CHANGED
|
@@ -15,7 +15,7 @@ class SearchTurkish(SearchLanguage):
|
|
|
15
15
|
js_stemmer_rawcode = 'turkish-stemmer.js'
|
|
16
16
|
stopwords: set[str] = set()
|
|
17
17
|
|
|
18
|
-
def init(self, options: dict) -> None:
|
|
18
|
+
def init(self, options: dict[str, str]) -> None:
|
|
19
19
|
self.stemmer = snowballstemmer.stemmer('turkish')
|
|
20
20
|
|
|
21
21
|
def stem(self, word: str) -> str:
|
sphinx/search/zh.py
CHANGED
|
@@ -4,14 +4,13 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
6
|
import re
|
|
7
|
-
from typing import TYPE_CHECKING, Dict, List
|
|
8
7
|
|
|
9
8
|
import snowballstemmer
|
|
10
9
|
|
|
11
10
|
from sphinx.search import SearchLanguage
|
|
12
11
|
|
|
13
12
|
try:
|
|
14
|
-
import jieba
|
|
13
|
+
import jieba # type: ignore[import-not-found]
|
|
15
14
|
JIEBA = True
|
|
16
15
|
except ImportError:
|
|
17
16
|
JIEBA = False
|
|
@@ -227,7 +226,7 @@ class SearchChinese(SearchLanguage):
|
|
|
227
226
|
latin1_letters = re.compile(r'[a-zA-Z0-9_]+')
|
|
228
227
|
latin_terms: list[str] = []
|
|
229
228
|
|
|
230
|
-
def init(self, options: dict) -> None:
|
|
229
|
+
def init(self, options: dict[str, str]) -> None:
|
|
231
230
|
if JIEBA:
|
|
232
231
|
dict_path = options.get('dict')
|
|
233
232
|
if dict_path and os.path.isfile(dict_path):
|