From d042c4bc37234808858b15511d9cff67cb1be6a6 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 4 Dec 2023 22:26:14 +1100 Subject: [PATCH] Added typing.IO to type hint --- src/PIL/ImageFont.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PIL/ImageFont.py b/src/PIL/ImageFont.py index 217580594..f406bfc94 100644 --- a/src/PIL/ImageFont.py +++ b/src/PIL/ImageFont.py @@ -34,6 +34,7 @@ import warnings from enum import IntEnum from io import BytesIO from pathlib import Path +from typing import IO from . import Image from ._util import is_directory, is_path @@ -190,7 +191,7 @@ class FreeTypeFont: def __init__( self, - font: bytes | str | Path | None = None, + font: bytes | str | Path | IO | None = None, size: float = 10, index: int = 0, encoding: str = "",