From 74b87ae7486e475c032044a648c33605514844ed Mon Sep 17 00:00:00 2001 From: Nulano Date: Tue, 30 Apr 2024 16:32:29 +0200 Subject: [PATCH] Move import to top of file --- src/PIL/PyAccess.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/PIL/PyAccess.py b/src/PIL/PyAccess.py index af9595666..cc8e2e359 100644 --- a/src/PIL/PyAccess.py +++ b/src/PIL/PyAccess.py @@ -49,6 +49,9 @@ except ImportError as ex: logger = logging.getLogger(__name__) +if TYPE_CHECKING: + from . import Image + class PyAccess: def __init__(self, img: Image.Image, readonly: bool = False) -> None: @@ -371,7 +374,3 @@ def new(img: Image.Image, readonly: bool = False) -> PyAccess | None: logger.debug("PyAccess Not Implemented: %s", img.mode) return None return access_type(img, readonly) - - -if TYPE_CHECKING: - from . import Image