Bläddra i källkod

Fix formatting

pull/338/head
Jakub Klinkovský 1 år sedan
förälder
incheckning
f3dd73d8a0
2 ändrade filer med 6 tillägg och 4 borttagningar
  1. +3
    -2
      src/mwparserfromhell/nodes/html_entity.py
  2. +3
    -2
      src/mwparserfromhell/nodes/template.py

+ 3
- 2
src/mwparserfromhell/nodes/html_entity.py Visa fil

@@ -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



+ 3
- 2
src/mwparserfromhell/nodes/template.py Visa fil

@@ -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():


Laddar…
Avbryt
Spara