From 869af9cb9c1091fbbb64c723a35f6c01dd123cfe Mon Sep 17 00:00:00 2001 From: Simon Alling Date: Sun, 13 Jul 2025 18:23:02 +0200 Subject: [PATCH] bs4 types (typecheck should fail due to type error) --- requirements.txt | 2 +- src/modules/inject.py | 2 +- typecheck | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements.txt b/requirements.txt index cf24d23..f4dae68 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ asgiref==3.3.1 -beautifulsoup4==4.9.3 +beautifulsoup4==4.13.4 blinker==1.4 Brotli==1.0.9 certifi==2020.12.5 diff --git a/src/modules/inject.py b/src/modules/inject.py index 4f639c1..9b8006d 100644 --- a/src/modules/inject.py +++ b/src/modules/inject.py @@ -46,7 +46,7 @@ def inject(script: Userscript, soup: BeautifulSoup, options: Options) -> Union[B insertLateIn(soup, tag) else: insertEarlyIn(soup, tag) - return soup + return 5 except Exception as e: return e diff --git a/typecheck b/typecheck index 12be8aa..9b603a3 100755 --- a/typecheck +++ b/typecheck @@ -4,5 +4,5 @@ set -e export MYPYPATH=/usr/local/lib/python3.6/dist-packages/ -mypy src/*.py --ignore-missing-imports --follow-imports skip -mypy src/modules/*.py --ignore-missing-imports --follow-imports skip +mypy src/*.py --follow-imports skip +mypy src/modules/*.py --follow-imports skip