From 7934eb66ac365240e8938f4559e03cbccd7ab34d Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 8 Dec 2025 17:09:06 +0000
Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
updates:
- https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror
- [github.com/psf/black-pre-commit-mirror: 20.8b1 → 25.12.0](https://github.com/psf/black-pre-commit-mirror/compare/20.8b1...25.12.0)
- [github.com/PyCQA/flake8: 3.8.4 → 7.3.0](https://github.com/PyCQA/flake8/compare/3.8.4...7.3.0)
- [github.com/asottile/pyupgrade: v2.7.4 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v2.7.4...v3.21.2)
---
.pre-commit-config.yaml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1fed4b0..d68cec7 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -1,15 +1,15 @@
repos:
- - repo: https://github.com/psf/black
- rev: 20.8b1
+ - repo: https://github.com/psf/black-pre-commit-mirror
+ rev: 25.12.0
hooks:
- id: black
args: [--line-length=80]
- repo: https://github.com/PyCQA/flake8
- rev: "3.8.4"
+ rev: "7.3.0"
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
- rev: v2.7.4
+ rev: v3.21.2
hooks:
- id: pyupgrade
args: [--py36-plus]
From f2308c9a8256c90c9b75ad17bcbed82154d09bc2 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Mon, 8 Dec 2025 17:10:12 +0000
Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---
morepath_wiki/html.py | 60 +++++++++++++++++++++----------------------
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/morepath_wiki/html.py b/morepath_wiki/html.py
index efb04ee..eceee26 100644
--- a/morepath_wiki/html.py
+++ b/morepath_wiki/html.py
@@ -346,7 +346,7 @@ def __exit__(self, exc_type, exc_value, exc_tb):
self._stack.pop()
def __repr__(self):
- return "".format(self._name, id(self))
+ return f""
def _stringify(self, str_type):
# turn me and my content into text
@@ -424,19 +424,19 @@ def _stringify(self, str_type):
class TestCase(unittest.TestCase):
def test_empty_tag(self):
"generation of an empty HTML tag"
- self.assertEquals(str(HTML().br), "
")
+ self.assertEqual(str(HTML().br), "
")
def test_empty_tag_xml(self):
"generation of an empty XHTML tag"
- self.assertEquals(str(XHTML().br), "
")
+ self.assertEqual(str(XHTML().br), "
")
def test_tag_add(self):
"test top-level tag creation"
- self.assertEquals(str(HTML("html", "text")), "\ntext\n")
+ self.assertEqual(str(HTML("html", "text")), "\ntext\n")
def test_tag_add_no_newline(self):
"test top-level tag creation"
- self.assertEquals(
+ self.assertEqual(
str(HTML("html", "text", newlines=False)), "text"
)
@@ -445,7 +445,7 @@ def test_iadd_tag(self):
h = XML("xml")
h += XML("some-tag", "spam", newlines=False)
h += XML("text", "spam", newlines=False)
- self.assertEquals(
+ self.assertEqual(
str(h),
"
hello
") + self.assertEqual(str(h), "hello
") def test_escape(self): "escaping of special HTML characters in text" h = HTML() h.text("<>&") - self.assertEquals(str(h), "<>&") + self.assertEqual(str(h), "<>&") def test_no_escape(self): "no escaping of special HTML characters in text" h = HTML() h.text("<>&", False) - self.assertEquals(str(h), "<>&") + self.assertEqual(str(h), "<>&") def test_escape_attr(self): "escaping of special HTML characters in attributes" h = HTML() h.br(id='<>&"') - self.assertEquals(str(h), 'hello, world!\nmore text
") + self.assertEqual(str(h), "hello, world!\nmore text
") def test_add_text_newlines(self): "add text to a tag with newlines for prettiness" h = HTML() p = h.p("hello, world!", newlines=True) p.text("more text") - self.assertEquals(str(h), "\nhello, world!\nmore text\n
") + self.assertEqual(str(h), "\nhello, world!\nmore text\n
") def test_doc_newlines(self): "default document adding newlines between tags" h = HTML() h.br h.br - self.assertEquals(str(h), "%s
" % TEST) + self.assertEqual(unicode(h), "%s
" % TEST) def test_table(self): 'multiple "with" context blocks' @@ -598,7 +598,7 @@ def test_table(self): with h.tr: h.td("column 1") h.td("column 2") - self.assertEquals( + self.assertEqual( str(h), """| column 1 | column 2 |