8000 Fix argument type for ``jieba.load_userdict()`` (#13396) · sphinx-doc/sphinx@162f7b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 162f7b1

Browse files
xunyinzheAA-Turner
andauthored
Fix argument type for jieba.load_userdict() (#13396)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
1 parent b79f17b commit 162f7b1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ Features added
1616
Bugs fixed
1717
----------
1818

19+
* #13392: Fix argument type for ``jieba.load_userdict()``.
20+
1921
Testing
2022
-------

sphinx/search/zh.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def init(self, options: dict[str, str]) -> None:
234234
if JIEBA:
235235
dict_path = options.get('dict', JIEBA_DEFAULT_DICT)
236236
if dict_path and Path(dict_path).is_file():
237-
jieba.load_userdict(dict_path)
237+
jieba.load_userdict(str(dict_path))
238238

239239
self.stemmer = snowballstemmer.stemmer('english')
240240

0 commit comments

Comments
 (0)
0