File tree Expand file tree Collapse file tree 8 files changed +17
-9
lines changed
Expand file tree Collapse file tree 8 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def test_deferred_error():
6666 # Arrange
6767
6868 # Act
69- thing = _util .DeferredError (ValueError ("Some error text" ))
69+ thing = _util .DeferredError . new (ValueError ("Some error text" ))
7070
7171 # Assert
7272 with pytest .raises (ValueError ):
Original file line number Diff line number Diff line change @@ -144,9 +144,7 @@ exclude = [
144144 ' ^src/PIL/DdsImagePlugin.py$' ,
145145 ' ^src/PIL/FpxImagePlugin.py$' ,
146146 ' ^src/PIL/Image.py$' ,
147- ' ^src/PIL/ImageCms.py$' ,
148147 ' ^src/PIL/ImageFile.py$' ,
149- ' ^src/PIL/ImageFont.py$' ,
150148 ' ^src/PIL/ImageMath.py$' ,
151149 ' ^src/PIL/ImageMorph.py$' ,
152150 ' ^src/PIL/ImageQt.py$' ,
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ class DecompressionBombError(Exception):
9292 raise ImportError (msg )
9393
9494except ImportError as v :
95- core = DeferredError (ImportError ("The _imaging C module is not installed." ))
95+ core = DeferredError . new (ImportError ("The _imaging C module is not installed." ))
9696 # Explanations for ways that we know we might have an import error
9797 if str (v ).startswith ("Module use of python" ):
9898 # The _imaging C module is present, but not compiled for
Original file line number Diff line number Diff line change 2828 # anything in core.
2929 from ._util import DeferredError
3030
31- _imagingcms = DeferredError (ex )
31+ _imagingcms = DeferredError . new (ex )
3232
3333DESCRIPTION = """
3434pyCMS
Original file line number Diff line number Diff line change 3434from enum import IntEnum
3535from io import BytesIO
3636from pathlib import Path
37- from typing import IO
37+ from typing import BinaryIO
3838
3939from . import Image
4040from ._util import is_directory , is_path
@@ -53,7 +53,7 @@ class Layout(IntEnum):
5353except ImportError as ex :
5454 from ._util import DeferredError
5555
56- core = DeferredError (ex )
56+ core = DeferredError . new (ex )
5757
5858
5959def _string_length_check (text ):
@@ -191,7 +191,7 @@ class FreeTypeFont:
191191
192192 def __init__ (
193193 self ,
194- font : bytes | str | Path | IO | None = None ,
194+ font : bytes | str | Path | BinaryIO | None = None ,
195195 size : float = 10 ,
196196 index : int = 0 ,
197197 encoding : str = "" ,
Original file line number Diff line number Diff line change 4343 # anything in core.
4444 from ._util import DeferredError
4545
46- FFI = ffi = DeferredError (ex )
46+ FFI = ffi = DeferredError . new (ex )
4747
4848logger = logging .getLogger (__name__ )
4949
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
3+ from typing import Any
4+
5+ def __getattr__ (name : str ) -> Any : ...
Original file line number Diff line number Diff line change 1+ from __future__ import annotations
2+
3+ from typing import Any
4+
5+ def __getattr__ (name : str ) -> Any : ...
You can’t perform that action at this time.
0 commit comments