Flake8 fixes

This commit is contained in:
Andrew Murray 2015-09-22 20:31:59 +10:00
parent 31524b2e6b
commit a5bac62bc3
2 changed files with 41 additions and 38 deletions

View File

@ -227,6 +227,7 @@ def _limit_rational(val, max_val):
_load_dispatch = {} _load_dispatch = {}
_write_dispatch = {} _write_dispatch = {}
class ImageFileDirectory_v2(collections.MutableMapping): class ImageFileDirectory_v2(collections.MutableMapping):
"""This class represents a TIFF tag directory. To speed things up, we """This class represents a TIFF tag directory. To speed things up, we
don't decode tags unless they're asked for. don't decode tags unless they're asked for.
@ -644,6 +645,7 @@ for idx, name in TYPES.items():
setattr(ImageFileDirectory_v2, "write_" + name, _write_dispatch[idx]) setattr(ImageFileDirectory_v2, "write_" + name, _write_dispatch[idx])
del _load_dispatch, _write_dispatch, idx, name del _load_dispatch, _write_dispatch, idx, name
# Legacy ImageFileDirectory support. # Legacy ImageFileDirectory support.
class ImageFileDirectory_v1(ImageFileDirectory_v2): class ImageFileDirectory_v1(ImageFileDirectory_v2):
"""This class represents the **legacy** interface to a TIFF tag directory. """This class represents the **legacy** interface to a TIFF tag directory.
@ -735,6 +737,7 @@ class ImageFileDirectory_v1(ImageFileDirectory_v2):
# undone -- switch this pointer when IFD_LEGACY_API == False # undone -- switch this pointer when IFD_LEGACY_API == False
ImageFileDirectory = ImageFileDirectory_v1 ImageFileDirectory = ImageFileDirectory_v1
## ##
# Image plugin for TIFF files. # Image plugin for TIFF files.

View File

@ -19,6 +19,7 @@
from collections import namedtuple from collections import namedtuple
class TagInfo(namedtuple("_TagInfo", "value name type length enum")): class TagInfo(namedtuple("_TagInfo", "value name type length enum")):
__slots__ = [] __slots__ = []
@ -312,4 +313,3 @@ TYPES = {}
# 11: "float", # 11: "float",
# 12: "double", # 12: "double",
# } # }