Skip to content

Replace Union with | syntax in frequency.py#3487

Merged
vfdev-5 merged 2 commits intopytorch:masterfrom
JonSnow1807:refactor-typing-frequency
Jan 15, 2026
Merged

Replace Union with | syntax in frequency.py#3487
vfdev-5 merged 2 commits intopytorch:masterfrom
JonSnow1807:refactor-typing-frequency

Conversation

@JonSnow1807
Copy link
Copy Markdown
Contributor

Summary

  • Replace Union[str, torch.device] with str | torch.device
  • Remove Union from typing import (keep Callable)

Part of #3481

Test plan

  • Import check verified

Part of pytorch#3481: Update typing hints to use Python 3.10+ syntax.
@github-actions github-actions bot added the module: metrics Metrics module label Jan 15, 2026
Copy link
Copy Markdown
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks !

@vfdev-5 vfdev-5 enabled auto-merge January 15, 2026 10:50
@vfdev-5 vfdev-5 added this pull request to the merge queue Jan 15, 2026
Merged via the queue into pytorch:master with commit 1847a73 Jan 15, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants