Skip to content

Commit be0bf9c

Browse files
committed
ci: Quality
1 parent 8290fc8 commit be0bf9c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/mkdocs_spellcheck/plugin.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
from mkdocs.config.config_options import Type as MkType
1212
from mkdocs.plugins import BasePlugin
13-
from mkdocs.structure.pages import Page
1413

1514
from mkdocs_spellcheck.loggers import get_plugin_logger
1615
from mkdocs_spellcheck.words import get_words
@@ -24,7 +23,7 @@
2423
logger = get_plugin_logger(__name__)
2524

2625

27-
def load_backend(name: str) -> Backend:
26+
def load_backend(name: str) -> type[Backend]:
2827
"""Load the specified backend.
2928
3029
This function imports the specified backend and returns its class.
@@ -41,12 +40,13 @@ def load_backend(name: str) -> Backend:
4140
from mkdocs_spellcheck.backends import symspellpy
4241

4342
return symspellpy.SymspellpyBackend
44-
elif name == "codespell":
43+
44+
if name == "codespell":
4545
from mkdocs_spellcheck.backends import codespell
4646

4747
return codespell.CodespellBackend
48-
else:
49-
raise ValueError(f"Unknown backend: {name}")
48+
49+
raise ValueError(f"Unknown backend: {name}")
5050

5151

5252
class SpellCheckPlugin(BasePlugin):

0 commit comments

Comments
 (0)