Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pulled in latest tantivy for Document.from_dict typing fix #916

Merged
merged 1 commit into from
Mar 20, 2025

Conversation

jamesbraza
Copy link
Collaborator

@jamesbraza jamesbraza added the enhancement New feature or request label Mar 20, 2025
@jamesbraza jamesbraza self-assigned this Mar 20, 2025
@Copilot Copilot bot review requested due to automatic review settings March 20, 2025 22:11
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 20, 2025
@jamesbraza jamesbraza changed the title Pulled in latest tantivy for Document.from_dict Pulled in latest tantivy for Document.from_dict typing fix Mar 20, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the tantivy dependency to version 0.22.2 to integrate the fix for the typing issue in Document.from_dict as described in the upstream PR. It synchronizes the version across both dependency files and removes the now-unnecessary type-ignore annotation in the search agent.

  • Updated tantivy dependency and version pin in pyproject.toml.
  • Adjusted .pre-commit-config.yaml to match the new tantivy version.
  • Removed the type-ignore comment from the add_document call in paperqa/agents/search.py.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
pyproject.toml Pinned tantivy version to 0.22.2 for a typing fix in Document.from_dict.
.pre-commit-config.yaml Updated tantivy version to match pyproject.toml.
paperqa/agents/search.py Removed type-ignore comment in the call to Document.from_dict.
Comments suppressed due to low confidence (1)

paperqa/agents/search.py:310

  • Verify that the removal of the type ignore comment is safe with the updated tantivy version; ensure that Document.from_dict correctly accepts index_doc without type issues.
writer.add_document(Document.from_dict(index_doc))

Copy link
Collaborator

@maykcaldas maykcaldas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every # type: ignore that is deleted makes me happy

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 20, 2025
@jamesbraza jamesbraza merged commit 127b666 into main Mar 20, 2025
5 checks passed
@jamesbraza jamesbraza deleted the latest-tantivy branch March 20, 2025 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants