mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Flake8 fixes
This commit is contained in:
parent
31524b2e6b
commit
a5bac62bc3
|
@ -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.
|
||||||
|
|
||||||
|
|
|
@ -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",
|
||||||
# }
|
# }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user