Type tags for TiffTags

This commit is contained in:
Eric Soroos 2018-01-03 11:02:07 +00:00
parent 3ebc0f2455
commit f55c6eb23f

View File

@ -19,9 +19,11 @@
from collections import namedtuple from collections import namedtuple
if False:
from typing import Dict, List, Text
class TagInfo(namedtuple("_TagInfo", "value name type length enum")): 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): def __new__(cls, value=None, name="unknown", type=None, length=None, enum=None):
return super(TagInfo, cls).__new__( return super(TagInfo, cls).__new__(
@ -359,7 +361,7 @@ _populate()
## ##
# Map type numbers to type names -- defined in ImageFileDirectory. # Map type numbers to type names -- defined in ImageFileDirectory.
TYPES = {} TYPES = {} # type: Dict[int, Text]
# was: # was:
# TYPES = { # TYPES = {