diff --git a/mypy.ini b/mypy.ini index 195686d15ec..64d0fead144 100644 --- a/mypy.ini +++ b/mypy.ini @@ -53,9 +53,6 @@ ignore_errors = True [mypy-torch.distributed.*] ignore_errors = True -[mypy-torch.testing._internal.codegen.*] -ignore_errors = True - [mypy-torch.testing._internal.hypothesis_utils.*] ignore_errors = True diff --git a/torch/testing/_internal/codegen/random_topo_test.py b/torch/testing/_internal/codegen/random_topo_test.py index e2823a97f10..2eed0bad4e4 100644 --- a/torch/testing/_internal/codegen/random_topo_test.py +++ b/torch/testing/_internal/codegen/random_topo_test.py @@ -2,6 +2,8 @@ import torch import numpy as np import argparse +from typing import Dict + # debug print DEBUG_PRINT = False @@ -71,7 +73,7 @@ def random_topology_test(seed, *inp_tensor_list): return get_root(dependency_map[x], dependency_map) else: return x - d_map = {} + d_map: Dict[int, int] = {} num_sets = num_tensor candidate = list(range(num_tensor))