From 7c3e02f34782a8797e9e26903984b47dcc9e6f7a Mon Sep 17 00:00:00 2001 From: TheOnlyWayUp Date: Mon, 9 Jun 2025 14:21:53 +0000 Subject: [PATCH] fix(api): Incorrect type reference in AbstractGenerator --- src/api/src/create_book/generators/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/src/create_book/generators/types.py b/src/api/src/create_book/generators/types.py index d79b0da..f47363c 100644 --- a/src/api/src/create_book/generators/types.py +++ b/src/api/src/create_book/generators/types.py @@ -1,5 +1,5 @@ from io import BytesIO -from tempfile import NamedTemporaryFile +from tempfile import _TemporaryFileWrapper from typing import List, Literal from bs4 import BeautifulSoup @@ -30,7 +30,7 @@ class AbstractGenerator: self.cover = cover self.images = images - self.book: EpubBook | NamedTemporaryFile = None + self.book: EpubBook | _TemporaryFileWrapper = None # type: ignore def compile(self) -> Literal[True]: """Compile the part trees into the corresponding in-memory representation of the generator format.