Skip to content

Commit afd6e1f

Browse files
committed
import _imagingcms as core
1 parent 21566eb commit afd6e1f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/PIL/ImageCms.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
from ._deprecate import deprecate
3030

3131
try:
32-
from . import _imagingcms
32+
from . import _imagingcms as core
3333
except ImportError as ex:
3434
# Allow error import for doc purposes, but error out when accessing
3535
# anything in core.
3636
from ._util import DeferredError
3737

38-
_imagingcms = DeferredError.new(ex)
38+
core = DeferredError.new(ex)
3939

4040
_DESCRIPTION = """
4141
pyCMS
@@ -119,7 +119,6 @@ def __getattr__(name: str) -> Any:
119119

120120
# --------------------------------------------------------------------.
121121

122-
core = _imagingcms
123122

124123
#
125124
# intent/direction values
@@ -257,7 +256,7 @@ def __init__(self, profile: str | BinaryIO | core.CmsProfile) -> None:
257256
self._set(core.profile_open(profile), profile)
258257
elif hasattr(profile, "read"):
259258
self._set(core.profile_frombytes(profile.read()))
260-
elif isinstance(profile, _imagingcms.CmsProfile):
259+
elif isinstance(profile, core.CmsProfile):
261260
self._set(profile)
262261
else:
263262
msg = "Invalid type for Profile" # type: ignore[unreachable]

0 commit comments

Comments
 (0)