Skip to content

Cleanup: Replace absolute PIL imports with relative imports #2342

@jleclanche

Description

@jleclanche

There's a ton of stuff like this in all the plugins:

from PIL import Image, ImageFile, ImagePalette, _binary

The ones shipped with PIL should be using relative imports instead.

This would also be a good occasion to replace all this kind of nonsense:

from PIL import Image, ImageFile, ImagePalette, _binary
i8 = _binary.i8
i16 = _binary.i16le
i32 = _binary.i32le
o8 = _binary.o8
o16 = _binary.o16le
o32 = _binary.o32le

With this:

from ._binary import i8, i16, i32, o8, o16, o32

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions