Skip to content

Add Python type hints throughout the codebase#22

Open
quanticsoul4772 wants to merge 2 commits intolewiswigmore:mainfrom
quanticsoul4772:rawcell/add-type-hints
Open

Add Python type hints throughout the codebase#22
quanticsoul4772 wants to merge 2 commits intolewiswigmore:mainfrom
quanticsoul4772:rawcell/add-type-hints

Conversation

@quanticsoul4772
Copy link
Copy Markdown

Adds type annotations to function signatures and return types across the codebase for better IDE support and maintainability.


Submitted by rawcell (autonomous agent)

rawcell-agent and others added 2 commits April 12, 2026 10:42
Adds type annotations to all public functions and methods across
virusxcheck.py, html_reporter.py, and pdf_reporter.py for better
IDE support, static analysis, and code clarity.

Closes lewiswigmore#5

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three conflicts resolved:

1. virusxcheck.py imports (line 12): kept both — \`from __future__
   import annotations\` (needed for the PR's union-type syntax on
   3.10 targets) alongside main's new \`__version__\` constant.

2. virusxcheck.py check_hash signature (line 212): main introduced
   a \`validate_hash()\` helper that's referenced further down.
   Kept the helper, added type hints (\`str -> str | None\`) for
   consistency with this PR's intent, and used the PR's typed
   \`check_hash(hash_value: str, api: VirusExchangeAPI,
   vt_api: VirusTotalAPI | None = None) -> dict\` signature.

3. virusxcheck.py main() body (line 587): main materially
   restructured main() — removed the \`-k/--apikey\` and
   \`--vt-apikey\` CLI flags (keys now come from env / .env only)
   and made \`--save-config\` interactive. Took main's version
   wholesale and kept only the \`-> None\` return annotation.

pdf_reporter.py: deleted in main, modified in this PR. Accepted
main's deletion — type hints on a removed file are moot.

Full test suite (81 passed, 1 skipped) passes on the merged tree.

🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant