Typing: Ignore forcibly setting things to errors

This commit is contained in:
Eric Soroos 2018-01-05 14:30:27 +00:00
parent bee50685cb
commit 4a30b7af69

View File

@ -82,7 +82,7 @@ try:
PILLOW_VERSION)) PILLOW_VERSION))
except ImportError as v: except ImportError as v:
core = _imaging_not_installed() core = _imaging_not_installed() # type: ignore
# Explanations for ways that we know we might have an import error # Explanations for ways that we know we might have an import error
if str(v).startswith("Module use of python"): if str(v).startswith("Module use of python"):
# The _imaging C module is present, but not compiled for # The _imaging C module is present, but not compiled for
@ -613,7 +613,7 @@ class Image(object):
# Instead of simply setting to None, we're setting up a # Instead of simply setting to None, we're setting up a
# deferred error that will better explain that the core image # deferred error that will better explain that the core image
# object is gone. # object is gone.
self.im = deferred_error(ValueError("Operation on closed image")) self.im = deferred_error(ValueError("Operation on closed image")) # type: ignore
def _copy(self): def _copy(self):
# type: () -> None # type: () -> None