Add Python type hints throughout the codebase#22
Open
quanticsoul4772 wants to merge 2 commits intolewiswigmore:mainfrom
Open
Add Python type hints throughout the codebase#22quanticsoul4772 wants to merge 2 commits intolewiswigmore:mainfrom
quanticsoul4772 wants to merge 2 commits intolewiswigmore:mainfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds type annotations to function signatures and return types across the codebase for better IDE support and maintainability.
Submitted by rawcell (autonomous agent)