From 21c253da45c20a84fd309488bf4f674868aa44e3 Mon Sep 17 00:00:00 2001 From: Chetan Kini Date: Tue, 15 Nov 2022 15:48:58 -0500 Subject: [PATCH] chore: type ignore mypy errors --- great_expectations/exceptions/exceptions.py | 2 +- great_expectations/util.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/great_expectations/exceptions/exceptions.py b/great_expectations/exceptions/exceptions.py index fa11ee92ee85..6abe4a59bd5b 100644 --- a/great_expectations/exceptions/exceptions.py +++ b/great_expectations/exceptions/exceptions.py @@ -304,7 +304,7 @@ def __init__(self, module_name, class_name) -> None: class ClassInstantiationError(GreatExpectationsError): def __init__(self, module_name, package_name, class_name) -> None: - module_spec = importlib.util.find_spec(module_name, package=package_name) + module_spec = importlib.util.find_spec(module_name, package=package_name) # type: ignore[attr-defined] if not module_spec: if not package_name: package_name = "" diff --git a/great_expectations/util.py b/great_expectations/util.py index 840b66fee63c..500c399b06f2 100644 --- a/great_expectations/util.py +++ b/great_expectations/util.py @@ -77,14 +77,14 @@ try: import black except ImportError: - black = None + black = None # type: ignore[assignment] try: # This library moved in python 3.8 import importlib.metadata as importlib_metadata except ModuleNotFoundError: # Fallback for python < 3.8 - import importlib_metadata # type: ignore[no-redef] + import importlib_metadata logger = logging.getLogger(__name__) @@ -365,7 +365,7 @@ def verify_dynamic_loading_support( """ try: # noinspection PyUnresolvedReferences - module_spec: importlib.machinery.ModuleSpec = importlib.util.find_spec( # type: ignore[assignment] + module_spec: importlib.machinery.ModuleSpec = importlib.util.find_spec( # type: ignore[attr-defined] module_name, package=package_name ) except ModuleNotFoundError: