From f3dd73d8a039fcc28f280b17472d4e5f144f6107 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= <1289205+lahwaacz@users.noreply.github.com> Date: Sun, 11 May 2025 14:38:35 +0200 Subject: [PATCH] Fix formatting --- src/mwparserfromhell/nodes/html_entity.py | 5 +++-- src/mwparserfromhell/nodes/template.py | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mwparserfromhell/nodes/html_entity.py b/src/mwparserfromhell/nodes/html_entity.py index 2322e38..4a21ad0 100644 --- a/src/mwparserfromhell/nodes/html_entity.py +++ b/src/mwparserfromhell/nodes/html_entity.py @@ -132,8 +132,9 @@ class HTMLEntity(Node): int(self.value, 16) except ValueError as exc: raise ValueError( - "current entity value {!r} is not a valid " - "Unicode codepoint".format(self.value) + "current entity value {!r} is not a valid Unicode codepoint".format( + self.value + ) ) from exc self._named = newval diff --git a/src/mwparserfromhell/nodes/template.py b/src/mwparserfromhell/nodes/template.py index e3abe79..b4c89a2 100644 --- a/src/mwparserfromhell/nodes/template.py +++ b/src/mwparserfromhell/nodes/template.py @@ -32,6 +32,7 @@ FLAGS = re.DOTALL | re.UNICODE # Used to allow None as a valid fallback value _UNSET = object() + class Template(Node): """Represents a template in wikicode, like ``{{foo}}``.""" @@ -331,9 +332,9 @@ class Template(Node): def update(self, params, **kwargs): """Update the template with multiple parameters at once. Args: - params: A dictionary mapping parameter names to values. + params: A dictionary mapping parameter names to values. **kwargs: Optional arguments that will be applied to all parameters, - matching the same arguments in :meth:`add` (showkey, before, + matching the same arguments in :meth:`add` (showkey, before, after, preserve_spacing) """ for name, value in params.items():