Fix mypy for mediawiki connector

This commit is contained in:
Weves 2024-05-25 13:04:09 -07:00 committed by Chris Weaver
parent 2dab9c576c
commit dfd233b985
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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