Skip to content

Commit e9e18a9

Browse files
bobrenjc93pytorchmergebot
authored andcommitted
remove allow-untyped-defs from _export/db/logging.py (pytorch#144093)
Pull Request resolved: pytorch#144093 Approved by: https://github.com/Skylion007
1 parent ad09395 commit e9e18a9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

torch/_export/db/logging.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# mypy: allow-untyped-defs
1+
from typing import Optional
22

3-
4-
def exportdb_error_message(case_name: str):
3+
def exportdb_error_message(case_name: str) -> str:
54
from .examples import all_examples
65
from torch._utils_internal import log_export_usage
76

@@ -19,7 +18,7 @@ def exportdb_error_message(case_name: str):
1918
return f"{case_name} is unsupported."
2019

2120

22-
def get_class_if_classified_error(e):
21+
def get_class_if_classified_error(e: Exception) -> Optional[str]:
2322
"""
2423
Returns a string case name if the export error e is classified.
2524
Returns None otherwise.

0 commit comments

Comments
 (0)