mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[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:
committed by
PyTorch MergeBot
parent
6ff32b5575
commit
0be65069d3
@ -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
|
||||
|
Reference in New Issue
Block a user