[PR #546] Add missing return type hints to Buffer methods #629

Open
opened 2026-10-27 21:04:41 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/546
Author: @yurekami
Created: 12/25/2025
Status: 🔄 Open

Base: main ← Head: add-return-type-hint


📝 Commits (1)

  • 7bece28 Add missing return type hints to Buffer methods

📊 Changes

1 file changed (+7 additions, -7 deletions)

View changed files

📝 deep_ep/buffer.py (+7 -7)

📄 Description

Summary

  • Add return type annotations to 7 methods in Buffer class that were missing them
  • Improves type safety, IDE support, and documentation

Changes

Methods updated with return type hints:

  • destroy() -> None
  • is_sm90_compiled() -> bool
  • _unpack_bias() -> Tuple[Optional[torch.Tensor], Optional[torch.Tensor]]
  • low_latency_update_mask_buffer() -> None
  • low_latency_query_mask_buffer() -> None
  • low_latency_clean_mask_buffer() -> None
  • get_next_low_latency_combine_buffer() -> torch.Tensor

Test plan

  • Verify existing tests still pass (type hints don't change runtime behavior)
  • Verify type checker compatibility with mypy/pyright

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepEP/pull/546 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-return-type-hint` --- ### 📝 Commits (1) - [`7bece28`](https://github.com/deepseek-ai/DeepEP/commit/7bece2849f1b9e073053390a9fb767a45da8882e) Add missing return type hints to Buffer methods ### 📊 Changes **1 file changed** (+7 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `deep_ep/buffer.py` (+7 -7) </details> ### 📄 Description ## Summary - Add return type annotations to 7 methods in `Buffer` class that were missing them - Improves type safety, IDE support, and documentation ## Changes Methods updated with return type hints: - `destroy() -> None` - `is_sm90_compiled() -> bool` - `_unpack_bias() -> Tuple[Optional[torch.Tensor], Optional[torch.Tensor]]` - `low_latency_update_mask_buffer() -> None` - `low_latency_query_mask_buffer() -> None` - `low_latency_clean_mask_buffer() -> None` - `get_next_low_latency_combine_buffer() -> torch.Tensor` ## Test plan - [ ] Verify existing tests still pass (type hints don't change runtime behavior) - [ ] Verify type checker compatibility with mypy/pyright 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#629
No description provided.