From c01e67243f14637e586117c0ed7185f33d867f82 Mon Sep 17 00:00:00 2001 From: suryasidd Date: Thu, 27 Mar 2025 11:45:29 -0700 Subject: [PATCH] Fixed typechecker issues --- backends/openvino/partitioner.py | 2 ++ backends/openvino/preprocess.py | 2 ++ backends/openvino/quantizer/quantizer.py | 2 ++ backends/openvino/tests/test_runner.py | 2 +- examples/openvino/aot_optimize_and_infer.py | 2 +- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/backends/openvino/partitioner.py b/backends/openvino/partitioner.py index 4dcd01033a4..bc3fde573e2 100644 --- a/backends/openvino/partitioner.py +++ b/backends/openvino/partitioner.py @@ -4,6 +4,8 @@ # except in compliance with the License. See the license file found in the # LICENSE file in the root directory of this source tree. +# mypy: disable-error-code=import-not-found + from typing import Callable, final, List, Optional, Tuple import torch diff --git a/backends/openvino/preprocess.py b/backends/openvino/preprocess.py index bfb2ce0b623..c343f44a8b5 100644 --- a/backends/openvino/preprocess.py +++ b/backends/openvino/preprocess.py @@ -4,6 +4,8 @@ # except in compliance with the License. See the license file found in the # LICENSE file in the root directory of this source tree. +# mypy: disable-error-code=import-not-found + from typing import final, List from executorch.exir.backend.backend_details import ( diff --git a/backends/openvino/quantizer/quantizer.py b/backends/openvino/quantizer/quantizer.py index 72f8faa6a1f..5532235f573 100644 --- a/backends/openvino/quantizer/quantizer.py +++ b/backends/openvino/quantizer/quantizer.py @@ -4,6 +4,8 @@ # except in compliance with the License. See the license file found in the # LICENSE file in the root directory of this source tree. +# mypy: disable-error-code=import-not-found + from collections import defaultdict from enum import Enum from typing import Any, Callable, DefaultDict, Dict, List, Optional, Tuple, Type diff --git a/backends/openvino/tests/test_runner.py b/backends/openvino/tests/test_runner.py index ad1404b5df5..021c372db25 100644 --- a/backends/openvino/tests/test_runner.py +++ b/backends/openvino/tests/test_runner.py @@ -1,7 +1,7 @@ import argparse import unittest -import nncf.torch # type: ignore[import-untyped] +import nncf.torch # type: ignore[import-untyped,import-not-found] class OpenvinoTestSuite(unittest.TestSuite): diff --git a/examples/openvino/aot_optimize_and_infer.py b/examples/openvino/aot_optimize_and_infer.py index 4e2cf671aff..acd9c896f42 100644 --- a/examples/openvino/aot_optimize_and_infer.py +++ b/examples/openvino/aot_optimize_and_infer.py @@ -4,7 +4,7 @@ # except in compliance with the License. See the license file found in the # LICENSE file in the root directory of this source tree. -# mypy: disable-error-code=import-untyped +# mypy: disable-error-code="import-untyped,import-not-found" import argparse import time