fix: complete ty CI migration

This commit is contained in:
NotoriousRebel
2026-08-24 20:31:32 -04:00
parent 144e8645a6
commit cfbcb19386
6 changed files with 10 additions and 9 deletions
+1 -1
View File
@@ -60,4 +60,4 @@ jobs:
run: pytest
- name: Type check with ty
run: ty theHarvester
run: ty check
+1 -1
View File
@@ -31,7 +31,7 @@ Read [CONTEXT.md](CONTEXT.md) before changing discovery semantics, result or evi
- Full tests: `uv run pytest`
- Lint: `uv run ruff check .`
- Formatting: `uv run ruff format --check .`
- Typing: `uv run mypy theHarvester`
- Typing: `uv run ty check`
Run focused checks first and expand according to risk. Report any skipped check and its reason.
+1 -1
View File
@@ -72,7 +72,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reworked routine CI to use read-only permissions, non-mutating Ruff checks, offline tests, and explicit opt-in live provider checks ([72e5820f](https://github.com/laramies/theHarvester/commit/72e5820f)).
- Grouped GitHub Actions, Python, and Docker Dependabot updates with a seven-day cooldown, and added a seven-day `uv` dependency freshness window ([7a947b66](https://github.com/laramies/theHarvester/commit/7a947b66), [52a79cdb](https://github.com/laramies/theHarvester/commit/52a79cdb)).
- Updated runtime dependencies: `aiohttp` to `3.14.3`, `beautifulsoup4` to `4.15.0`, `certifi` to `2026.6.17`, `fastapi` to `0.138.1`, and `uvicorn` to `0.52.1`.
- Updated development dependencies: `mypy` to `2.1.0`, `pytest` to `9.1.1`, `pytest-asyncio` to `1.4.0`, `pytest-playwright` to `0.8.0`, and `ruff` to `0.16.1`.
- Replaced `mypy` with `ty` `0.0.72` for type checking, and updated `pytest` to `9.1.1`, `pytest-asyncio` to `1.4.0`, `pytest-playwright` to `0.8.0`, and `ruff` to `0.16.3`.
- Updated CI and container maintenance pins, including `actions/checkout`, `astral-sh/setup-uv`, `astral-sh/ruff-action`, `github/codeql-action`, StepSecurity Harden-Runner, Docker actions, and the Python base image.
- Expanded offline regression coverage for discovery providers, configuration contracts, logging, output, documentation, workflow policy, and scope boundaries.
+1 -1
View File
@@ -72,7 +72,7 @@ Before submitting, run the non-mutating quality checks and full test suite:
uv run ruff check .
uv run ruff format --check .
uv run pytest
uv run mypy theHarvester
uv run ty check
```
Before a release, manually dispatch the **Release validation** workflow against
+4 -3
View File
@@ -36,10 +36,11 @@ def test_unused_packages_are_not_direct_development_requirements() -> None:
development = _dependency_names(project['dependency-groups']['dev'])
locked = {package['name'] for package in lock['package']}
assert development.isdisjoint({'mypy-extensions', 'ty', 'types-certifi', 'types-chardet', 'wheel'})
assert {'ty', 'types-certifi', 'types-chardet', 'wheel'}.isdisjoint(locked)
assert development.isdisjoint({'mypy', 'mypy-extensions', 'types-certifi', 'types-chardet', 'wheel'})
assert {'mypy', 'mypy-extensions', 'types-certifi', 'types-chardet', 'wheel'}.isdisjoint(locked)
assert 'ty' in development
assert 'exclude-newer-package' not in project['tool']['uv']
assert 'ty' not in project['tool']
assert 'mypy' not in project['tool']
def test_runtime_imports_without_optional_json_extensions() -> None:
+2 -2
View File
@@ -21,7 +21,7 @@ def test_python_version_policy_requires_314() -> None:
assert project['project']['requires-python'] == '>=3.14'
assert 'Programming Language :: Python :: 3.12' not in project['project']['classifiers']
assert 'Programming Language :: Python :: 3.13' not in project['project']['classifiers']
assert project['tool']['mypy']['python_version'] == '3.14'
assert project['tool']['ty']['src']['include'] == ['theHarvester']
assert project['tool']['uv']['pip']['python-version'] == '3.14'
assert project['tool']['ruff']['target-version'] == 'py314'
bug_report = (PROJECT_ROOT / '.github' / 'ISSUE_TEMPLATE' / 'bug_report.yml').read_text(encoding='utf-8')
@@ -42,7 +42,7 @@ def test_routine_ci_is_read_only_and_offline() -> None:
assert 'git push' not in commands
assert 'theHarvester -d' not in commands
assert '\npytest\n' in f'\n{commands.strip()}\n'
assert 'mypy theHarvester' in commands
assert '\nty check\n' in f'\n{commands.strip()}\n'
assert routine_job['strategy']['matrix']['python-version'] == ['3.14']