8000 mypy: filter warning on missing-return-statement; as per the correspo… · pytorch/pytorch@09dfd2b · GitHub
[go: up one dir, main page]

Skip to content

Commit 09dfd2b

Browse files
committed
mypy: filter warning on missing-return-statement; as per the corresponding comment on line 124, the method should always return a value
1 parent e5fe23b commit 09dfd2b

File tree

1 file changed

+1
-1
lines changed
  • torch/distributed/elastic/multiprocessing

1 file changed

+1
-1
lines changed

torch/distributed/elastic/multiprocessing/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def from_str(cls, vm: str) -> Union["Std", Dict[int, "Std"]]:
117117
Any other input raises an exception
118118
"""
119119

120-
def to_std(v: str) -> Std:
120+
def to_std(v: str) -> Std: # type: ignore[return]
121121
s = Std(int(v))
122122
if s in Std:
123123
return s

0 commit comments

Comments
 (0)
0