From 7e678fecf3fa6a054f4a50c25833eca67faf6544 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Mon, 26 Oct 2026 16:27:12 +0530 Subject: [PATCH] Fix: remove unused black and pytest-html from requirements Drop dev-only packages that pull in MPL-2.0 deps; make the husky hooks pass --html only when pytest-html is installed. Co-Authored-By: Claude Sonnet 5.5 --- .husky/hooks/test-runner.sh | 7 ++++++- .husky/pre-push | 7 ++++++- requirements.txt | 2 -- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.husky/hooks/test-runner.sh b/.husky/hooks/test-runner.sh index 4dcfe11..e0220f7 100755 --- a/.husky/hooks/test-runner.sh +++ b/.husky/hooks/test-runner.sh @@ -20,7 +20,12 @@ fi # Run tests echo " - Running tests..." -if pytest --html=tests/test-report/test-report.html; then +# HTML report only when pytest-html is installed (it is optional) +HTML_ARGS="" +if python -c "import pytest_html" 2>/dev/null; then + HTML_ARGS="--html=tests/test-report/test-report.html" +fi +if pytest $HTML_ARGS; then echo " โœ… All tests passed" else echo " โŒ Tests failed. Please fix before pushing." diff --git a/.husky/pre-push b/.husky/pre-push index 55f5168..55ce37f 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -10,7 +10,12 @@ fi # Run tests to ensure code quality echo "๐Ÿงช Running tests..." -if ! pytest --html=tests/test-report/test-report.html; then +# HTML report only when pytest-html is installed (it is optional) +HTML_ARGS="" +if python -c "import pytest_html" 2>/dev/null; then + HTML_ARGS="--html=tests/test-report/test-report.html" +fi +if ! pytest $HTML_ARGS; then echo "โŒ Tests failed. Please fix before pushing." exit 1 fi diff --git a/requirements.txt b/requirements.txt index 2f61310..1509117 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,5 @@ lxml~=6.1.0 ruff==0.11.5 pytest>=7.0.0 pytest-cov>=4.0.0 -pytest-html>=4.2.0 -black>=26.3.1 flake8>=6.0.0 isort>=5.0.0