mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
[torchgen] Fix an unused variable in api/python.py (#142337)
Extracted from https://github.com/pytorch/pytorch/pull/136359 Changes behavior, but the original code seems like it was an obvious oops. Pull Request resolved: https://github.com/pytorch/pytorch/pull/142337 Approved by: https://github.com/Skylion007
This commit is contained in:
committed by
PyTorch MergeBot
parent
ef26f1c57e
commit
869665c44c
@ -994,7 +994,7 @@ def return_type_str_pyi(t: Type) -> str:
|
||||
if t.name == BaseTy.Device:
|
||||
return "_device"
|
||||
elif t.name == BaseTy.Dimname:
|
||||
ret = "Optional[str]"
|
||||
return "Optional[str]"
|
||||
else:
|
||||
return argument_type_str_pyi(t)
|
||||
|
||||
|
Reference in New Issue
Block a user