Skip to content

Replace typing hints with new version in ignite/engine/__init__.py#3576

Merged
vfdev-5 merged 7 commits intopytorch:masterfrom
kyuksel:replace-typing-hints-engine-init
Feb 25, 2026
Merged

Replace typing hints with new version in ignite/engine/__init__.py#3576
vfdev-5 merged 7 commits intopytorch:masterfrom
kyuksel:replace-typing-hints-engine-init

Conversation

@kyuksel
Copy link
Copy Markdown
Contributor

@kyuksel kyuksel commented Feb 23, 2026

Description

  • Part of Replace typing hints with new version #3481
  • Replaces legacy typing imports (Dict, Optional, Sequence, Tuple, Union) with the newer syntax (X | Y, X | None, dict, tuple) in ignite/engine/__init__.py.
  • Moves Sequence to collections.abc

Changes

  • Moved Sequence import from typing to collections.abc
  • Removed Dict, Optional, Tuple, Union from typing imports
  • Replaced all Optional[X]X | None
  • Replaced all Union[A, B]A | B
  • Replaced Dictdict, Tupletuple

Checklist

@github-actions github-actions bot added the module: engine Engine module label Feb 23, 2026
@kyuksel kyuksel changed the title replace typing hints in ignite/engine/__init__.py Replace typing hints with new version in ignite/engine/__init__.py Feb 23, 2026
@github-actions github-actions bot added the module: utils Utils module label Feb 23, 2026
@kyuksel kyuksel force-pushed the replace-typing-hints-engine-init branch from c414bc9 to a5a33db Compare February 23, 2026 18:36
@kyuksel kyuksel requested a review from vfdev-5 February 23, 2026 18:37
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 @kyuksel, LGTM !

@kyuksel kyuksel force-pushed the replace-typing-hints-engine-init branch from b4b8881 to 61772e6 Compare February 23, 2026 23:00
@github-actions github-actions bot added the docs label Feb 24, 2026
@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Feb 24, 2026

@kyuksel here is what we should do to fix doctest: #3586
and I have to fix linkcheck on master as well (well, copilot will do that)

@vfdev-5 vfdev-5 enabled auto-merge February 24, 2026 23:38
@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Feb 24, 2026

Thanks again @kyuksel for your patience with this docs checking system!
Let's merge it finally :)

@vfdev-5 vfdev-5 added this pull request to the merge queue Feb 24, 2026
Merged via the queue into pytorch:master with commit 68e4440 Feb 25, 2026
21 checks passed
@kyuksel
Copy link
Copy Markdown
Contributor Author

kyuksel commented Feb 25, 2026

Thanks again @kyuksel for your patience with this docs checking system! Let's merge it finally :)

@vfdev-5 Thank you for the review and the suggestions!

@kyuksel kyuksel deleted the replace-typing-hints-engine-init branch February 25, 2026 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs module: engine Engine module module: utils Utils module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants