diff --git a/lib/galaxy/tool_util/verify/__init__.py b/lib/galaxy/tool_util/verify/__init__.py index 976c8706b684..e54a70c9d7af 100644 --- a/lib/galaxy/tool_util/verify/__init__.py +++ b/lib/galaxy/tool_util/verify/__init__.py @@ -31,7 +31,7 @@ try: from PIL import Image except ImportError: - pass + Image = None # type: ignore[assignment] from galaxy.tool_util.parser.util import ( DEFAULT_DELTA, diff --git a/lib/galaxy/util/image_util.py b/lib/galaxy/util/image_util.py index 1b9bf7d99bb5..2cf405ae6390 100644 --- a/lib/galaxy/util/image_util.py +++ b/lib/galaxy/util/image_util.py @@ -10,7 +10,7 @@ try: from PIL import Image except ImportError: - PIL = None + Image = None # type: ignore[assignment] log = logging.getLogger(__name__)