From e3360367f71f96bf738f33e97482e44386eb35ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Mon, 28 Aug 2023 16:10:18 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20DocInfo=20to=20not=20be?= =?UTF-8?q?=20a=20dataclass,=20Jelle's=20feedback,=20avoid=20bootstrapping?= =?UTF-8?q?=20problems,=20make=20it=20hashable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- typing_doc.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/typing_doc.md b/typing_doc.md index c502f7b6e..b699b481e 100644 --- a/typing_doc.md +++ b/typing_doc.md @@ -89,12 +89,9 @@ def create_user( The return of the `doc()` function is an instance of a class that can be checked and used at runtime, defined as: ```Python -from dataclasses import dataclass - - -@dataclass class DocInfo: - documentation: str + def __init__(self, documentation: str): + self.documentation = documentation ``` where the attribute `documentation` contains the same value string passed to the function `doc()`.