From 58ec9262dbd75a7afee476d613edb44c37341744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Thu, 1 Sep 2022 21:24:43 +0200 Subject: [PATCH] ci: Fix mypy complaints --- src/markdown_exec/rendering.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/markdown_exec/rendering.py b/src/markdown_exec/rendering.py index 921d068..eaec9c4 100644 --- a/src/markdown_exec/rendering.py +++ b/src/markdown_exec/rendering.py @@ -2,6 +2,7 @@ from __future__ import annotations +from itertools import chain from textwrap import indent from xml.etree.ElementTree import Element @@ -130,7 +131,8 @@ def run(self, root: Element): # noqa: D102,WPS231 def _mimic(md: Markdown) -> Markdown: md = getattr(md, "_original_md", md) new_md = Markdown() # noqa: WPS442 - new_md.registerExtensions(md.registeredExtensions + ["tables", "md_in_html"], {}) + extensions = list(chain(md.registeredExtensions, ["tables", "md_in_html"])) + new_md.registerExtensions(extensions, {}) new_md.treeprocessors.register( _IdPrependingTreeprocessor(md, ""), _IdPrependingTreeprocessor.name,