From bee50685cb0f320a48e7224e72d6bed36ced7e74 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Fri, 5 Jan 2018 14:28:22 +0000 Subject: [PATCH] Typing: ImageShow typehints --- src/PIL/ImageShow.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/PIL/ImageShow.py b/src/PIL/ImageShow.py index bf8c67eb5..b3d4cedcf 100644 --- a/src/PIL/ImageShow.py +++ b/src/PIL/ImageShow.py @@ -18,6 +18,9 @@ from PIL import Image import os import sys +if False: + from typing import Dict, Any + if sys.version_info >= (3, 3): from shlex import quote else: @@ -76,8 +79,8 @@ class Viewer(object): # hook methods - format = None - options = {} + format = None # type: str + options = {} # type: Dict[Any, Any] def get_format(self, image): """Return format name, or None to save as PGM/PPM"""