From d31e6f3183128f914c321cfb1d75c99263266b9d Mon Sep 17 00:00:00 2001 From: Martin Bernstorff Date: Sun, 3 Sep 2023 14:29:44 +0200 Subject: [PATCH] types: override tg --- pyproject.toml | 2 +- src/gpt2anki/hydrator/main.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5cafd3b..493b705 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ name = "MIT" [project.optional-dependencies] dev = [ "cruft>=2.0.0", - "pyright", + "pyright==1.1.325", "pyright-polite>=0.0.1", "pre-commit>=2.20.0", "ruff>=0.0.254", diff --git a/src/gpt2anki/hydrator/main.py b/src/gpt2anki/hydrator/main.py index 2ffa322..fc5d16a 100644 --- a/src/gpt2anki/hydrator/main.py +++ b/src/gpt2anki/hydrator/main.py @@ -3,7 +3,7 @@ from typing import Callable import requests -from bs4 import BeautifulSoup, NavigableString +from bs4 import BeautifulSoup, NavigableString, Tag from gpt2anki.sources.base import HydratedHighlight, OrphanHighlight from joblib import Memory @@ -34,7 +34,7 @@ def get_highlight_context( print(f"Could not find highlight {highlight} in {soup.title}") return "" - highlight_container = highlight_selection.parent.parent + highlight_container: Tag = highlight_selection.parent.parent # type: ignore context_strings: list[str] = []