[PR #31458] fix: replace Any type annotation with dict[str, Any] | None for retrieval_model parameter #33244

Open
opened 2026-02-21 20:52:56 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/31458

State: open
Merged: No


Description

This PR addresses the FIXME comment in hit_testing_service.py by replacing the Any type annotation with a more specific type annotation dict[str, Any] | None for the retrieval_model parameter.

Changes

  • Replaced Any type with dict[str, Any] | None for retrieval_model parameter in HitTestingService.retrieve() method
  • Improves type safety and code clarity
  • The parameter is used as a dictionary throughout the method, so this type annotation accurately reflects its usage

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Code quality improvement

Testing

  • No functional changes, only type annotation improvement
  • Existing tests should continue to pass
**Original Pull Request:** https://github.com/langgenius/dify/pull/31458 **State:** open **Merged:** No --- ## Description This PR addresses the FIXME comment in `hit_testing_service.py` by replacing the `Any` type annotation with a more specific type annotation `dict[str, Any] | None` for the `retrieval_model` parameter. ## Changes - Replaced `Any` type with `dict[str, Any] | None` for `retrieval_model` parameter in `HitTestingService.retrieve()` method - Improves type safety and code clarity - The parameter is used as a dictionary throughout the method, so this type annotation accurately reflects its usage ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue) - [x] Code quality improvement ## Testing - No functional changes, only type annotation improvement - Existing tests should continue to pass
yindo added the pull-request label 2026-02-21 20:52:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#33244