From 77c2845bd7c02d1685e1965366c585a3eef62417 Mon Sep 17 00:00:00 2001 From: GeoJulien Date: Sat, 16 Dec 2023 23:00:04 +0100 Subject: [PATCH] fix: type hint with subscriptable types --- mkdocs_rss_plugin/util.py | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mkdocs_rss_plugin/util.py b/mkdocs_rss_plugin/util.py index 7361dbef..6f6be0b8 100644 --- a/mkdocs_rss_plugin/util.py +++ b/mkdocs_rss_plugin/util.py @@ -480,7 +480,7 @@ def get_description_or_abstract( else: return description if description else "" - def get_image(self, in_page: Page, base_url: str) -> Optional[tuple[str, str, int]]: + def get_image(self, in_page: Page, base_url: str) -> Optional[Tuple[str, str, int]]: """Get page's image from page meta or social cards and returns properties. Args: @@ -489,7 +489,7 @@ def get_image(self, in_page: Page, base_url: str) -> Optional[tuple[str, str, in with local path. Returns: - Optional[tuple[str, str, int]]: (image url, mime type, image length) or None if + Optional[Tuple[str, str, int]]: (image url, mime type, image length) or None if there is no image set """ if in_page.meta.get("image"): diff --git a/setup.py b/setup.py index b7c2f5cf..76b4b2a4 100644 --- a/setup.py +++ b/setup.py @@ -30,8 +30,8 @@ def load_requirements(requirements_files: Union[Path, List[Path]]) -> list: """Helper to load requirements list from a path or a list of paths. Args: - requirements_files (Path | list[Path]): path or list to paths of requirements - file(s) + requirements_files (Union[Path, List[Path]]): path or list to paths of + requirements file(s) Returns: list: list of requirements loaded from file(s)