80a1a47eef
Five provider modules (pinterest, threads, instagram, tiktok, youtube_yt) and watchlist.py each carried a try/except `requests` import with parallel urllib + requests branches. The urllib path already used the stdlib-only wrapper at `lib/http.py` (retries, 429 handling, HTTPError). This collapses every dual-branch into a single `http.get`/`http.post` call and removes the `requests` dependency from `pyproject.toml`. Also drops 4 transitive deps (urllib3, certifi, charset-normalizer, idna) from the lockfile, leaving the skill stdlib-only at runtime. Tests for tiktok comments and watchlist delivery were rewritten to mock `lib.http` directly instead of the now-removed `requests` module. Out of scope but flagged during review: the 13 surviving SC call sites share a near-identical scaffold and would benefit from a `http.scrapecreators_get(url, params, token, ...)` helper. Filed for a follow-up PR rather than expanding scope here.
38 lines
644 B
TOML
38 lines
644 B
TOML
[project]
|
|
name = "last30days-skill"
|
|
version = "3.2.1"
|
|
description = "Multi-source last-30-days research skill"
|
|
readme = "README.md"
|
|
requires-python = ">=3.12"
|
|
dependencies = []
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9,<10",
|
|
"pytest-cov>=7,<8",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
addopts = [
|
|
"-q",
|
|
"--tb=short",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
branch = true
|
|
source = ["skills/last30days/scripts", "tests"]
|
|
omit = [
|
|
"skills/last30days/scripts/lib/vendor/*",
|
|
"dist/*",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
skip_empty = true
|
|
show_missing = true
|
|
omit = [
|
|
"skills/last30days/scripts/lib/vendor/*",
|
|
"dist/*",
|
|
]
|