diff --git a/src/epplibwrapper/__init__.py b/src/epplibwrapper/__init__.py index 29061da21..41cb0448d 100644 --- a/src/epplibwrapper/__init__.py +++ b/src/epplibwrapper/__init__.py @@ -40,7 +40,10 @@ except NameError: pass # Attn: these imports should NOT be at the top of the file -from .client import CLIENT, commands +try: + from .client import CLIENT, commands +except ImportError: + pass __all__ = [ "CLIENT", diff --git a/src/mypy.ini b/src/mypy.ini index a151424a3..e8708cb67 100644 --- a/src/mypy.ini +++ b/src/mypy.ini @@ -7,6 +7,8 @@ strict_optional = True # implicit_optional: treat arguments a None default value as implicitly Optional? # `var: int = None` is equal to `var: Optional[int] = None` implicit_optional = True +# we'd still like mypy to succeed when 3rd party libraries are not installed +ignore_missing_imports = True [mypy.plugins.django-stubs] django_settings_module = "registrar.config.settings"