refactor Optional[Union[...]] w | for utils.py;#3482
Conversation
|
After 0f1d178:
|
vfdev-5
left a comment
There was a problem hiding this comment.
Thanks for working on the PR!
|
@vfdev-5 thanks for giving me the opportunity to work on this one! And reviewing my work so many times. |
vfdev-5
left a comment
There was a problem hiding this comment.
LGTM, thanks @maifeeulasad !
Related to #3481
Description:
typingimportsOptional[Union[str, torch.device]]→str | torch.device | NoneOptional[Union[int, str]]→int | str | NoneOptional[str]→str | NoneOptional[TextIO]→TextIO | NoneOptional[int]→int | NoneTuple->tuple,List->list,Dict->dict,Type->typeTested w
python -m pytest tests/ignite/test_utils.py -x --tb=line --disable-warnings -qNB: The
Union[Any, "_CollectionItem"]was kept as-is sinceAnydoesn't work with the|operator syntax.Check list: