Skip to content

Commit 7b81852

Browse files
committed
types: drop redundant casts in html_cleanup (bs4 stubs present)
1 parent 74a870e commit 7b81852

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ requires-python = ">=3.10"
1111
authors = [{ name = "Your Name", email = "you@example.com" }]
1212
license = { file = "LICENSE" }
1313
dependencies = [
14-
"pdfminer.six>=20221105"
14+
"pdfminer.six>=20221105",
15+
"beautifulsoup4>=4.12",
1516
]
1617
classifiers = [
1718
"License :: OSI Approved :: Apache Software License",
@@ -42,6 +43,7 @@ dev = [
4243
"mkdocs>=1.5",
4344
"mkdocs-material>=9.5",
4445
"build>=1.2.1",
46+
"types-beautifulsoup4>=4.12",
4547
]
4648

4749
[project.scripts]

src/fek_extractor/utils/html_cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def tidy_article_html(html: str) -> str:
271271
if not html or not isinstance(html, str):
272272
return html or ""
273273

274-
soup = BeautifulSoup(html, "html.parser")
274+
soup: BeautifulSoup = BeautifulSoup(html, "html.parser")
275275

276276
# Use the body if BS4 wrapped our fragment; else use soup itself
277277
root_pe: PageElement = soup.body if soup.body else soup

0 commit comments

Comments
 (0)