File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
from mkdocs .config .config_options import Type as MkType
12
12
from mkdocs .plugins import BasePlugin
13
- from mkdocs .structure .pages import Page
14
13
15
14
from mkdocs_spellcheck .loggers import get_plugin_logger
16
15
from mkdocs_spellcheck .words import get_words
24
23
logger = get_plugin_logger (__name__ )
25
24
26
25
27
- def load_backend (name : str ) -> Backend :
26
+ def load_backend (name : str ) -> type [ Backend ] :
28
27
"""Load the specified backend.
29
28
30
29
This function imports the specified backend and returns its class.
@@ -41,12 +40,13 @@ def load_backend(name: str) -> Backend:
41
40
from mkdocs_spellcheck .backends import symspellpy
42
41
43
42
return symspellpy .SymspellpyBackend
44
- elif name == "codespell" :
43
+
44
+ if name == "codespell" :
45
45
from mkdocs_spellcheck .backends import codespell
46
46
47
47
return codespell .CodespellBackend
48
- else :
49
- raise ValueError (f"Unknown backend: { name } " )
48
+
49
+ raise ValueError (f"Unknown backend: { name } " )
50
50
51
51
52
52
class SpellCheckPlugin (BasePlugin ):
You can’t perform that action at this time.
0 commit comments