From 566922bbcd7b412bafb02593fb46bdd636d52b3a Mon Sep 17 00:00:00 2001 From: Vasiliy Kuznetsov Date: Fri, 8 Oct 2021 18:01:58 -0700 Subject: [PATCH] clean up mypy nit in torch/jit/_recursive.py (#66253) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66253 This was initially broken in #65829 and unbroken in #66003, this PR cleans it up by removing the mypy ignore line. Test Plan: ``` mypy torch/jit/_recursive.py --no-incremental ``` Imported from OSS Reviewed By: supriyar Differential Revision: D31475100 fbshipit-source-id: 46ab2ede72c08b926f4f9a6b03b1a1375b884c8a --- torch/jit/_recursive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/jit/_recursive.py b/torch/jit/_recursive.py index 4004fd630b5..789c10d9dff 100644 --- a/torch/jit/_recursive.py +++ b/torch/jit/_recursive.py @@ -131,7 +131,7 @@ def infer_concrete_type_builder(nn_module, share_types=True): concrete_type_builder.set_module_list() class_annotations = getattr(nn_module, '__annotations__', {}) - if isinstance(nn_module, (torch.ao.quantization.QuantWrapper)): # type: ignore[attr-defined] + if isinstance(nn_module, (torch.ao.quantization.QuantWrapper)): class_annotations = {} # Get user-annotated ignored attributes.