From f55c6eb23fbe6b707fc05951d2b26a3323666507 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Wed, 3 Jan 2018 11:02:07 +0000 Subject: [PATCH] Type tags for TiffTags --- src/PIL/TiffTags.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/PIL/TiffTags.py b/src/PIL/TiffTags.py index eba88ef8d..e71bebc4a 100644 --- a/src/PIL/TiffTags.py +++ b/src/PIL/TiffTags.py @@ -19,9 +19,11 @@ from collections import namedtuple +if False: + from typing import Dict, List, Text class TagInfo(namedtuple("_TagInfo", "value name type length enum")): - __slots__ = [] + __slots__ = [] # type: List[Text] def __new__(cls, value=None, name="unknown", type=None, length=None, enum=None): return super(TagInfo, cls).__new__( @@ -359,7 +361,7 @@ _populate() ## # Map type numbers to type names -- defined in ImageFileDirectory. -TYPES = {} +TYPES = {} # type: Dict[int, Text] # was: # TYPES = {