Skip to content

Commit

Permalink
chore: type ignore mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cdkini committed Nov 15, 2022
1 parent 48c2f6d commit 21c253d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion great_expectations/exceptions/exceptions.py
Expand Up @@ -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 = ""
Expand Down
6 changes: 3 additions & 3 deletions great_expectations/util.py
Expand Up @@ -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__)

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 21c253d

Please sign in to comment.