Skip to content

Add missing return type hints to Buffer methods#546

Open
yurekami wants to merge 1 commit intodeepseek-ai:mainfrom
yurekami:add-return-type-hint
Open

Add missing return type hints to Buffer methods#546
yurekami wants to merge 1 commit intodeepseek-ai:mainfrom
yurekami:add-return-type-hint

Conversation

@yurekami
Copy link
Copy Markdown
Contributor

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

Add return type annotations to improve type safety and IDE support:
- 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

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant