unify annotations to future syntax

This commit is contained in:
jayceslesar
2023-04-16 14:02:48 -04:00
parent 35175fc19b
commit 8990911522
19 changed files with 83 additions and 60 deletions

View File

@@ -1,10 +1,11 @@
"""HTML processing functions"""
from __future__ import annotations
from requests.compat import urljoin
from typing import List, Tuple
from bs4 import BeautifulSoup
def extract_hyperlinks(soup: BeautifulSoup, base_url: str) -> List[Tuple[str, str]]:
def extract_hyperlinks(soup: BeautifulSoup, base_url: str) -> list[tuple[str, str]]:
"""Extract hyperlinks from a BeautifulSoup object
Args:
@@ -20,7 +21,7 @@ def extract_hyperlinks(soup: BeautifulSoup, base_url: str) -> List[Tuple[str, st
]
def format_hyperlinks(hyperlinks: List[Tuple[str, str]]) -> List[str]:
def format_hyperlinks(hyperlinks: list[tuple[str, str]]) -> list[str]:
"""Format hyperlinks to be displayed to the user
Args: