Repository navigation
test: enable mypy checks for root-level test modules - #12758
Merged
Merged
Conversation
Contributor
|
@xblwh is attempting to deploy a commit to the deepset Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
@xblwh please resolve the conflicts with the pyproject.toml |
Contributor
Contributor
Author
|
@sjrl Resolved in f4fbdfe by merging Local validation on macOS / Python 3.12: mypy passes for 546 files; the four root-level modules plus GitHub now reports the PR as mergeable; the new workflows are waiting for approval. |
This was referenced Sep 24, 2026
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.
Related Issues
Proposed Changes:
Add the four root-level test modules (
test_logging.py,test_telemetry.py,test_imports.py, andtest_release_note_backticks.py) to thetypestarget. Checking them on the original baseline reported 15 errors in three files.capfdparameter annotations.EventDictfor the no-op processor, matching the processor interface.SpyingSpanbefore checking its correlation IDs.No casts or type ignores are added.
test_imports.pyalready passes and only needs the target entry. The existing test assertions remain in place.How did you test it?
hatch run test:types test/test_logging.py test/test_telemetry.py test/test_imports.py test/test_release_note_backticks.py— 15 errors.hatch run test:types— no errors in 546 source files.hatch run test:unit test/test_logging.py test/test_telemetry.py test/test_imports.py test/test_release_note_backticks.py test/components/agents/test_agent.py --no-cov -q— 206 passed, 4 integration cases deselected.hatch run fmt-check— all checks passed; 6679 files already formatted.pyproject.toml, the four root-level test modules, andtest_agent.py— all applicable hooks passed.git diff --check— passed.Validation ran on macOS with Python 3.12 and
HAYSTACK_TELEMETRY_ENABLED=false; the repository's fixtures still exercise telemetry while mocking network calls. The full unit/integration suite and the Linux/Windows matrix were not run locally.Notes for the reviewer
Synced with
mainat662e8b7, retaining thetest_agent.pymypy entry from #12761 alongside the four root-level modules. The PR remains limited to the same four files (+13/-8); the existing agent and converter type-checking scopes are preserved.The added assertions establish values required by the tests: a concrete spying span, a timestamp from the first telemetry event, the decorator's
__wrapped__attribute, and a usable module loader. They keep these expectations checked at runtime instead of suppressing the type errors.This is a tests-only change. No release note is included; the current release-note workflow exempts commits with a
test:prefix.This patch was generated with OpenAI Codex. The changes and local validation evidence were provided for human review before submission.
Checklist
AGENTS.md, andtest/AGENTS.md.test:title.test:commit exemption.