From 4efffdceca97e1986fcd89c836f07f6ef0a28c94 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 13 Apr 2025 12:09:08 +0200 Subject: [PATCH] removed typing.Self for better backwards compatibility --- src/pyladoc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyladoc/__init__.py b/src/pyladoc/__init__.py index 6b7d44a..4dce06e 100644 --- a/src/pyladoc/__init__.py +++ b/src/pyladoc/__init__.py @@ -1,4 +1,4 @@ -from typing import Callable, Generator, Self, Literal, TYPE_CHECKING +from typing import Callable, Generator, Literal, TYPE_CHECKING import html import markdown from base64 import b64encode @@ -307,7 +307,7 @@ class DocumentWriter(): self._fields[name] = new_dwr return new_dwr - def add_document(self, doc: Self) -> None: + def add_document(self, doc: 'DocumentWriter') -> None: self._doc += doc._doc def add_diagram(self, fig: Figure, caption: str = '', ref_id: str = '',