From ff8b89fa137ca5f7aa8f7698dfe6eb6683aaabc0 Mon Sep 17 00:00:00 2001 From: Seamus Johnston Date: Fri, 21 Apr 2023 11:22:30 -0500 Subject: [PATCH] Fix more test failures --- src/epplibwrapper/__init__.py | 5 ++++- src/mypy.ini | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) 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"