Skip to content

Commit abe7e73

Browse files
committed
Rearranged imports
1 parent 8c55d34 commit abe7e73

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/PIL/GifImagePlugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import subprocess
3232
from enum import IntEnum
3333
from functools import cached_property
34-
from typing import IO, Any, Literal, NamedTuple, cast
34+
from typing import Any, NamedTuple, cast
3535

3636
from . import (
3737
Image,
@@ -49,6 +49,8 @@
4949

5050
TYPE_CHECKING = False
5151
if TYPE_CHECKING:
52+
from typing import IO, Literal
53+
5254
from . import _imaging
5355
from ._typing import Buffer
5456

src/PIL/ImageDraw.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,23 @@
3333

3434
import math
3535
import struct
36-
from collections.abc import Callable, Sequence
36+
from collections.abc import Sequence
3737
from typing import cast
3838

3939
from . import Image, ImageColor
4040

41-
# experimental access to the outline API
42-
Outline: Callable[[], Image.core._Outline] = Image.core.outline
43-
4441
TYPE_CHECKING = False
4542
if TYPE_CHECKING:
43+
from collections.abc import Callable
4644
from types import ModuleType
4745
from typing import Any, AnyStr
4846

4947
from . import ImageDraw2, ImageFont
5048
from ._typing import Coords
5149

50+
# experimental access to the outline API
51+
Outline: Callable[[], Image.core._Outline] = Image.core.outline
52+
5253
_Ink = float | tuple[int, ...] | str
5354

5455
"""

0 commit comments

Comments
 (0)