mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-03 09:28:25 +02:00
Fix mypy for mediawiki connector
This commit is contained in:
parent
2dab9c576c
commit
dfd233b985
@ -9,7 +9,7 @@ from urllib.parse import urlparse
|
||||
from urllib.parse import urlunparse
|
||||
|
||||
from pywikibot import family # type: ignore[import-untyped]
|
||||
from pywikibot import pagegenerators
|
||||
from pywikibot import pagegenerators # type: ignore[import-untyped]
|
||||
from pywikibot.scripts import generate_family_file # type: ignore[import-untyped]
|
||||
from pywikibot.scripts.generate_user_files import pywikibot # type: ignore[import-untyped]
|
||||
|
||||
@ -132,7 +132,7 @@ def family_class_dispatch(url: str, name: str) -> type[family.Family]:
|
||||
|
||||
"""
|
||||
if "wikipedia" in url:
|
||||
import pywikibot.families.wikipedia_family
|
||||
import pywikibot.families.wikipedia_family # type: ignore[import-untyped]
|
||||
|
||||
return pywikibot.families.wikipedia_family.Family
|
||||
# TODO: Support additional families pre-defined in `pywikibot.families.*_family.py` files
|
||||
|
@ -6,9 +6,9 @@ from collections.abc import Generator
|
||||
from typing import Any
|
||||
from typing import ClassVar
|
||||
|
||||
import pywikibot.time
|
||||
from pywikibot import pagegenerators
|
||||
from pywikibot import textlib
|
||||
import pywikibot.time # type: ignore[import-untyped]
|
||||
from pywikibot import pagegenerators # type: ignore[import-untyped]
|
||||
from pywikibot import textlib # type: ignore[import-untyped]
|
||||
|
||||
from danswer.configs.app_configs import INDEX_BATCH_SIZE
|
||||
from danswer.configs.constants import DocumentSource
|
||||
|
Loading…
x
Reference in New Issue
Block a user