From 7a022abffa719870ce29705303ee9a8c08f3ec5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Hultn=C3=A9r?= Date: Tue, 26 May 2020 15:17:51 +0200 Subject: [PATCH] Use implicit cls instead of explicit self reference, allows for easier subclassing --- rich/markdown.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rich/markdown.py b/rich/markdown.py index d8f55c661..906f8be72 100644 --- a/rich/markdown.py +++ b/rich/markdown.py @@ -133,7 +133,7 @@ class Heading(TextElement): @classmethod def create(cls, markdown: "Markdown", node: Any) -> "Heading": - heading = Heading(node.level) + heading = cls(node.level) return heading def on_enter(self, context: "MarkdownContext") -> None: