Skip to content

refactor Union[A, B] w A | B and Optional[A] w A | None for common.py#3483

Merged
vfdev-5 merged 4 commits intopytorch:masterfrom
maifeeulasad:refactor-3481-2-maifee
Jan 15, 2026
Merged

refactor Union[A, B] w A | B and Optional[A] w A | None for common.py#3483
vfdev-5 merged 4 commits intopytorch:masterfrom
maifeeulasad:refactor-3481-2-maifee

Conversation

@maifeeulasad
Copy link
Copy Markdown
Contributor

@maifeeulasad maifeeulasad commented Jan 14, 2026

Related to #3481

Description:

  • Added from __future__ import annotations at the top
  • Removed un-wanted types from typing imports
  • Replaced all Union[A, B] with A | B
  • Replaced all Optional[A] with A | None
  • Replaced all Dict with dict
  • validated w python -m pytest tests/ignite/contrib/engines/test_common.py -x --tb=line --disable-warnings -q before and after

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the module: contrib Contrib module label Jan 14, 2026
@maifeeulasad maifeeulasad requested a review from vfdev-5 January 15, 2026 08:31
@maifeeulasad maifeeulasad requested a review from vfdev-5 January 15, 2026 14:32
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 14:37
@vfdev-5 vfdev-5 added this pull request to the merge queue Jan 15, 2026
Merged via the queue into pytorch:master with commit 5731dfe Jan 15, 2026
24 checks passed
@maifeeulasad
Copy link
Copy Markdown
Contributor Author

Thanks for all the support @vfdev-5 . Really appreciate it. Looking forward to work with you in the future as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: contrib Contrib module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants