Skip to content

Modernize type hints to Python 3.10+ in ignite/contrib/engines/tbptt.py#3538

Merged
vfdev-5 merged 4 commits intopytorch:masterfrom
Ayush-Aditya:modernize-type-hints-metrics_first
Feb 18, 2026
Merged

Modernize type hints to Python 3.10+ in ignite/contrib/engines/tbptt.py#3538
vfdev-5 merged 4 commits intopytorch:masterfrom
Ayush-Aditya:modernize-type-hints-metrics_first

Conversation

@Ayush-Aditya
Copy link
Copy Markdown
Contributor

Part of #3481

This PR updates type hints in ignite/contrib/engines/tbptt.py to Python 3.10+ syntax:

  • Replaced Union with |
  • Replaced Optional[str] with str | None
  • Replaced typing.Sequence with collections.abc.Sequence
  • Removed unused typing imports

No functional changes were made. All tests pass locally.

@github-actions github-actions bot added the module: contrib Contrib module label Feb 17, 2026
@github-actions github-actions bot added the module: metrics Metrics module label Feb 17, 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 February 18, 2026 09:27
@vfdev-5 vfdev-5 added this pull request to the merge queue Feb 18, 2026
Merged via the queue into pytorch:master with commit 68183d6 Feb 18, 2026
24 checks passed
@Ayush-Aditya Ayush-Aditya deleted the modernize-type-hints-metrics_first branch February 18, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: contrib Contrib module module: metrics Metrics module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants