mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-26 07:04:45 +03:00
Typing: ImageShow typehints
This commit is contained in:
parent
132ce41ff1
commit
bee50685cb
|
@ -18,6 +18,9 @@ from PIL import Image
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
if False:
|
||||||
|
from typing import Dict, Any
|
||||||
|
|
||||||
if sys.version_info >= (3, 3):
|
if sys.version_info >= (3, 3):
|
||||||
from shlex import quote
|
from shlex import quote
|
||||||
else:
|
else:
|
||||||
|
@ -76,8 +79,8 @@ class Viewer(object):
|
||||||
|
|
||||||
# hook methods
|
# hook methods
|
||||||
|
|
||||||
format = None
|
format = None # type: str
|
||||||
options = {}
|
options = {} # type: Dict[Any, Any]
|
||||||
|
|
||||||
def get_format(self, image):
|
def get_format(self, image):
|
||||||
"""Return format name, or None to save as PGM/PPM"""
|
"""Return format name, or None to save as PGM/PPM"""
|
||||||
|
|
Loading…
Reference in New Issue
Block a user