Added typing.IO to type hint

This commit is contained in:
Andrew Murray 2023-12-04 22:26:14 +11:00
parent 9a6c47a9d2
commit d042c4bc37

View File

@ -34,6 +34,7 @@ import warnings
from enum import IntEnum from enum import IntEnum
from io import BytesIO from io import BytesIO
from pathlib import Path from pathlib import Path
from typing import IO
from . import Image from . import Image
from ._util import is_directory, is_path from ._util import is_directory, is_path
@ -190,7 +191,7 @@ class FreeTypeFont:
def __init__( def __init__(
self, self,
font: bytes | str | Path | None = None, font: bytes | str | Path | IO | None = None,
size: float = 10, size: float = 10,
index: int = 0, index: int = 0,
encoding: str = "", encoding: str = "",