[BE] Use Literal from typing (#98846)

Since PyTorch is Python-3.8+ compatible framework

Pull Request resolved: https://github.com/pytorch/pytorch/pull/98846
Approved by: https://github.com/janeyx99, https://github.com/ZainRizvi, https://github.com/Neilblaze
This commit is contained in:
Nikita Shulga
2023-04-12 05:49:37 +00:00
committed by PyTorch MergeBot
parent 6ff32b5575
commit 0be65069d3
3 changed files with 3 additions and 6 deletions

View File

@ -16,6 +16,7 @@ from typing import (
Iterable,
Iterator,
List,
Literal,
NoReturn,
Optional,
Sequence,
@ -25,8 +26,6 @@ from typing import (
Union,
)
from typing_extensions import Literal # Python 3.8+
from torchgen.code_template import CodeTemplate
# Safely load fast C Yaml loader/dumper if they are available