-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: Products.CMFDiffTool
Branch: refs/heads/master Date: 2024-02-05T18:31:57Z Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> Commit: plone/Products.CMFDiffTool@81cb1bd [pre-commit.ci] pre-commit autoupdate updates: - [github.com/psf/black: 23.12.1 → 24.1.1](psf/black@23.12.1...24.1.1) - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](PyCQA/flake8@6.1.0...7.0.0) Files changed: M .pre-commit-config.yaml Repository: Products.CMFDiffTool Branch: refs/heads/master Date: 2024-02-05T18:32:09Z Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> Commit: plone/Products.CMFDiffTool@e83194e [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Files changed: M Products/CMFDiffTool/CMFDiffTool.py M Products/CMFDiffTool/__init__.py M Products/CMFDiffTool/libs/htmldiff.py M Products/CMFDiffTool/namedfile.py Repository: Products.CMFDiffTool Branch: refs/heads/master Date: 2024-02-19T10:36:55+01:00 Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> Commit: plone/Products.CMFDiffTool@879d5fc Merge branch 'master' into pre-commit-ci-update-config Files changed: A news/54.bugfix M Products/CMFDiffTool/ListDiff.py M Products/CMFDiffTool/tests/test_dexteritydiff.py Repository: Products.CMFDiffTool Branch: refs/heads/master Date: 2024-02-19T19:21:04+01:00 Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> Commit: plone/Products.CMFDiffTool@956ee77 Merge pull request #53 from plone/pre-commit-ci-update-config [pre-commit.ci] pre-commit autoupdate Files changed: M .pre-commit-config.yaml M Products/CMFDiffTool/CMFDiffTool.py M Products/CMFDiffTool/__init__.py M Products/CMFDiffTool/libs/htmldiff.py M Products/CMFDiffTool/namedfile.py
- Loading branch information
Showing
1 changed file
with
63 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,77 @@ | ||
Repository: plone.app.iterate | ||
Repository: Products.CMFDiffTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-02-19T14:15:01+01:00 | ||
Author: Kim Paulissen (spereverde) <spereverde@gmail.com> | ||
Commit: https://github.com/plone/plone.app.iterate/commit/f37417f6a8464746a1a1532116c3b777fc772502 | ||
Date: 2024-02-05T18:31:57Z | ||
Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> | ||
Commit: https://github.com/plone/Products.CMFDiffTool/commit/81cb1bd9bc0839fe7b0b32cfbb09a6f1d2a1ba22 | ||
|
||
Plone6 styles (#114) | ||
[pre-commit.ci] pre-commit autoupdate | ||
|
||
* Adapt viewlet styles to Plone 6 | ||
updates: | ||
- [github.com/psf/black: 23.12.1 → 24.1.1](https://github.com/psf/black/compare/23.12.1...24.1.1) | ||
- [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0) | ||
|
||
* add button css vclasses | ||
Files changed: | ||
M .pre-commit-config.yaml | ||
|
||
b'diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex aa2a758..e13b866 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@@ -16,7 +16,7 @@ repos:\n hooks:\n - id: isort\n - repo: https://github.com/psf/black\n- rev: 23.12.1\n+ rev: 24.1.1\n hooks:\n - id: black\n - repo: https://github.com/collective/zpretty\n@@ -32,7 +32,7 @@ repos:\n # """\n ##\n - repo: https://github.com/PyCQA/flake8\n- rev: 6.1.0\n+ rev: 7.0.0\n hooks:\n - id: flake8\n \n' | ||
|
||
Repository: Products.CMFDiffTool | ||
|
||
* add plone.app.layout as dependency | ||
|
||
* wrap messages in container | ||
Branch: refs/heads/master | ||
Date: 2024-02-05T18:32:09Z | ||
Author: pre-commit-ci[bot] (pre-commit-ci[bot]) <66853113+pre-commit-ci[bot]@users.noreply.github.com> | ||
Commit: https://github.com/plone/Products.CMFDiffTool/commit/e83194e2a865eafc171f670d8659aa9b72ecdf22 | ||
|
||
[pre-commit.ci] auto fixes from pre-commit.com hooks | ||
|
||
* zpretty | ||
for more information, see https://pre-commit.ci | ||
|
||
--------- | ||
Files changed: | ||
M Products/CMFDiffTool/CMFDiffTool.py | ||
M Products/CMFDiffTool/__init__.py | ||
M Products/CMFDiffTool/libs/htmldiff.py | ||
M Products/CMFDiffTool/namedfile.py | ||
|
||
b'diff --git a/Products/CMFDiffTool/CMFDiffTool.py b/Products/CMFDiffTool/CMFDiffTool.py\nindex 936c1ef..ed66d6a 100644\n--- a/Products/CMFDiffTool/CMFDiffTool.py\n+++ b/Products/CMFDiffTool/CMFDiffTool.py\n@@ -2,6 +2,7 @@\n \n Calculate differences between content objects\n """\n+\n from AccessControl import ClassSecurityInfo\n from AccessControl.class_init import InitializeClass\n from Acquisition import aq_base\ndiff --git a/Products/CMFDiffTool/__init__.py b/Products/CMFDiffTool/__init__.py\nindex 33fd937..75de100 100644\n--- a/Products/CMFDiffTool/__init__.py\n+++ b/Products/CMFDiffTool/__init__.py\n@@ -1,4 +1,5 @@\n """Initialize CMFDiffTool Product"""\n+\n # Set up a MessageFactory for the cmfdifftool domain\n from zope.i18nmessageid import MessageFactory\n \ndiff --git a/Products/CMFDiffTool/libs/htmldiff.py b/Products/CMFDiffTool/libs/htmldiff.py\nindex 107e71f..f6349ef 100644\n--- a/Products/CMFDiffTool/libs/htmldiff.py\n+++ b/Products/CMFDiffTool/libs/htmldiff.py\n@@ -10,6 +10,7 @@\n \n Better results if you use mxTidy first. The output is HTML.\n """\n+\n from difflib import SequenceMatcher\n from html import escape\n from io import StringIO\ndiff --git a/Products/CMFDiffTool/namedfile.py b/Products/CMFDiffTool/namedfile.py\nindex 1d1c0ef..671d00a 100644\n--- a/Products/CMFDiffTool/namedfile.py\n+++ b/Products/CMFDiffTool/namedfile.py\n@@ -70,9 +70,11 @@ def __init__(\n \n def _parseField(self, value, filename=None):\n return [\n- ""\n- if (value is None)\n- else named_file_as_str(NamedFile(data=value, filename=filename)),\n+ (\n+ ""\n+ if (value is None)\n+ else named_file_as_str(NamedFile(data=value, filename=filename))\n+ ),\n ]\n \n def inline_diff(self):\n' | ||
|
||
Repository: Products.CMFDiffTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-02-19T10:36:55+01:00 | ||
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> | ||
Commit: https://github.com/plone/Products.CMFDiffTool/commit/879d5fc476d489d4fef2f6f2d11b55dd94301694 | ||
|
||
Co-authored-by: Philip Bauer <bauer@starzel.de> | ||
Merge branch 'master' into pre-commit-ci-update-config | ||
|
||
Files changed: | ||
A news/95.news | ||
M plone/app/iterate/browser/cancel.pt | ||
M plone/app/iterate/browser/checkin.pt | ||
M plone/app/iterate/browser/checkout.pt | ||
M plone/app/iterate/browser/info.py | ||
M plone/app/iterate/browser/info_baseline.pt | ||
M plone/app/iterate/browser/info_checkout.pt | ||
M setup.py | ||
|
||
b'diff --git a/news/95.news b/news/95.news\nnew file mode 100644\nindex 0000000..fc711eb\n--- /dev/null\n+++ b/news/95.news\n@@ -0,0 +1 @@\n+Adapt viewlet styles to Plone 6 [pbauer]\n\\ No newline at end of file\ndiff --git a/plone/app/iterate/browser/cancel.pt b/plone/app/iterate/browser/cancel.pt\nindex 3b25333..7068c2c 100644\n--- a/plone/app/iterate/browser/cancel.pt\n+++ b/plone/app/iterate/browser/cancel.pt\n@@ -36,14 +36,14 @@\n \n <div class="formControls">\n \n- <input class="destructive"\n+ <input class="btn btn-danger"\n name="form.button.Cancel"\n type="submit"\n value="Cancel checkout"\n i18n:attributes="value"\n />\n \n- <input class="standalone"\n+ <input class="btn btn-secondary"\n name="form.button.Keep"\n type="submit"\n value="Keep checkout"\ndiff --git a/plone/app/iterate/browser/checkin.pt b/plone/app/iterate/browser/checkin.pt\nindex 3feaffb..0b53c25 100644\n--- a/plone/app/iterate/browser/checkin.pt\n+++ b/plone/app/iterate/browser/checkin.pt\n@@ -57,14 +57,14 @@\n </div>\n \n <div class="formControls">\n- <input class="context"\n+ <input class="btn btn-primary"\n name="form.button.Checkin"\n type="submit"\n value="Check in"\n i18n:attributes="value"\n />\n \n- <input class="standalone"\n+ <input class="btn btn-secondary"\n name="form.button.Cancel"\n type="submit"\n value="Cancel"\ndiff --git a/plone/app/iterate/browser/checkout.pt b/plone/app/iterate/browser/checkout.pt\nindex 45b308b..25bfa24 100644\n--- a/plone/app/iterate/browser/checkout.pt\n+++ b/plone/app/iterate/browser/checkout.pt\n@@ -91,14 +91,14 @@\n \n <div class="formControls">\n \n- <input class="context"\n+ <input class="btn btn-primary"\n name="form.button.Checkout"\n type="submit"\n value="Check out"\n i18n:attributes="value"\n />\n \n- <input class="standalone"\n+ <input class="btn btn-secondary"\n name="form.button.Cancel"\n type="submit"\n value="Cancel"\ndiff --git a/plone/app/iterate/browser/info.py b/plone/app/iterate/browser/info.py\nindex c18fcb1..092d6f5 100644\n--- a/plone/app/iterate/browser/info.py\n+++ b/plone/app/iterate/browser/info.py\n@@ -4,6 +4,7 @@\n from plone.app.iterate.interfaces import ICheckinCheckoutPolicy\n from plone.app.iterate.interfaces import keys\n from plone.app.iterate.permissions import CheckoutPermission\n+from plone.app.layout.viewlets.globalstatusmessage import MTYPES_DISPLAY\n from plone.memoize.instance import memoize\n from Products.CMFCore.permissions import ModifyPortalContent\n from Products.CMFCore.utils import getToolByName\n@@ -96,6 +97,10 @@ def properties(self):\n def _getReference(self):\n raise NotImplementedError\n \n+ def display_info_for_mtype(self, mtype):\n+ """get info for display of an mtype"""\n+ return MTYPES_DISPLAY.get(mtype, MTYPES_DISPLAY["info"])\n+\n \n class BaselineInfoViewlet(BaseInfoViewlet):\n index = ViewPageTemplateFile("info_baseline.pt")\ndiff --git a/plone/app/iterate/browser/info_baseline.pt b/plone/app/iterate/browser/info_baseline.pt\nindex 2728015..6e2c97d 100644\n--- a/plone/app/iterate/browser/info_baseline.pt\n+++ b/plone/app/iterate/browser/info_baseline.pt\n@@ -1,40 +1,47 @@\n-<div class="portalMessage warning"\n- tal:define="\n- working_copy view/working_copy;\n- isAnon context/@@plone_portal_state/anonymous;\n- "\n- tal:condition="python: not isAnon"\n- i18n:domain="plone"\n->\n+<div class="container">\n+ <div class="portalMessage ${python:display_info[\'cssclass\']}"\n+ role="alert"\n+ tal:define="\n+ working_copy view/working_copy;\n+ isAnon context/@@plone_portal_state/anonymous;\n+ display_info python:view.display_info_for_mtype(\'warning\');\n+ icons nocall: context/@@iconresolver;\n+ "\n+ tal:condition="python: not isAnon"\n+ i18n:domain="plone"\n+ >\n+\n+ <tal:icon tal:replace="structure python:icons.tag(display_info[\'icon\'], tag_alt=display_info[\'msg\'], tag_class=\'statusmessage-icon mb-1 me-2\')" />\n \n- <strong i18n:translate="">Warning</strong>\n- <tal:block i18n:translate="working_copy_info">\n+ <strong>${python:display_info[\'msg\']}</strong>\n+ <tal:block i18n:translate="working_copy_info">\n This item is being edited by\n- <a tal:content="view/creator_name"\n- tal:omit-tag="not: view/creator_url"\n- tal:attributes="\n- href view/creator_url;\n- "\n- i18n:name="creator"\n- >john smith</a>\n+ <a tal:content="view/creator_name"\n+ tal:omit-tag="not: view/creator_url"\n+ tal:attributes="\n+ href view/creator_url;\n+ "\n+ i18n:name="creator"\n+ >john smith</a>\n in\n- <a tal:attributes="\n- href working_copy/@@plone_context_state/view_url;\n- title working_copy/Description;\n- "\n- i18n:name="working_copy"\n- i18n:translate="label_working_copy"\n- >a working copy</a>\n+ <a tal:attributes="\n+ href working_copy/@@plone_context_state/view_url;\n+ title working_copy/Description;\n+ "\n+ i18n:name="working_copy"\n+ i18n:translate="label_working_copy"\n+ >a working copy</a>\n created on\n- <span tal:content="view/created"\n- i18n:name="created"\n- ></span>.\n+ <span tal:content="view/created"\n+ i18n:name="created"\n+ ></span>.\n \n- </tal:block>\n+ </tal:block>\n \n- (<a tal:attributes="\n- href string:${context/absolute_url}/@@iterate_diff;\n- "\n- i18n:translate="label_view_changes"\n- >View changes</a>)\n+ (<a tal:attributes="\n+ href string:${context/absolute_url}/@@iterate_diff;\n+ "\n+ i18n:translate="label_view_changes"\n+ >View changes</a>)\n+ </div>\n </div>\ndiff --git a/plone/app/iterate/browser/info_checkout.pt b/plone/app/iterate/browser/info_checkout.pt\nindex 9226b01..9d8f750 100644\n--- a/plone/app/iterate/browser/info_checkout.pt\n+++ b/plone/app/iterate/browser/info_checkout.pt\n@@ -1,40 +1,46 @@\n-<div class="portalMessage info"\n- tal:define="\n- baseline view/baseline;\n- "\n- i18n:domain="plone"\n->\n+<div class="container">\n+ <div class="portalMessage ${python:display_info[\'cssclass\']}"\n+ tal:define="\n+ baseline view/baseline;\n+ display_info python:view.display_info_for_mtype(\'warning\');\n+ icons nocall: context/@@iconresolver;\n+ "\n+ i18n:domain="plone"\n+ >\n+\n+ <tal:icon tal:replace="structure python:icons.tag(display_info[\'icon\'], tag_alt=display_info[\'msg\'], tag_class=\'statusmessage-icon mb-1 me-2\')" />\n \n- <strong i18n:translate="">Warning</strong>\n- <tal:block i18n:translate="checkout_info">\n+ <strong>${python:display_info[\'msg\']}</strong>\n+ <tal:block i18n:translate="checkout_info">\n \n This is a working copy of\n- <a tal:content="baseline/Title"\n- tal:attributes="\n- href baseline/@@plone_context_state/view_url;\n- title baseline/Description;\n- "\n- i18n:name="baseline_title"\n- ></a>, made by\n+ <a tal:content="baseline/Title"\n+ tal:attributes="\n+ href baseline/@@plone_context_state/view_url;\n+ title baseline/Description;\n+ "\n+ i18n:name="baseline_title"\n+ ></a>, made by\n \n- <a tal:content="view/creator_name"\n- tal:omit-tag="not: view/creator_url"\n- tal:attributes="\n- href view/creator_url;\n- "\n- i18n:name="creator"\n- >john smith</a>\n+ <a tal:content="view/creator_name"\n+ tal:omit-tag="not: view/creator_url"\n+ tal:attributes="\n+ href view/creator_url;\n+ "\n+ i18n:name="creator"\n+ >john smith</a>\n \n on\n \n- <span tal:content="view/created"\n- i18n:name="created"\n- ></span>.\n- </tal:block>\n+ <span tal:content="view/created"\n+ i18n:name="created"\n+ ></span>.\n+ </tal:block>\n \n- (<a tal:attributes="\n- href string:${context/absolute_url}/@@iterate_diff;\n- "\n- i18n:translate="view_changes"\n- >View changes</a>)\n+ (<a tal:attributes="\n+ href string:${context/absolute_url}/@@iterate_diff;\n+ "\n+ i18n:translate="view_changes"\n+ >View changes</a>)\n+ </div>\n </div>\ndiff --git a/setup.py b/setup.py\nindex 13dd918..ff43e54 100644\n--- a/setup.py\n+++ b/setup.py\n@@ -63,6 +63,7 @@\n "zope.schema",\n "zope.viewlet",\n "persistent",\n+ "plone.app.layout",\n "plone.base",\n "plone.dexterity",\n "plone.registry",\n' | ||
A news/54.bugfix | ||
M Products/CMFDiffTool/ListDiff.py | ||
M Products/CMFDiffTool/tests/test_dexteritydiff.py | ||
|
||
b'diff --git a/Products/CMFDiffTool/ListDiff.py b/Products/CMFDiffTool/ListDiff.py\nindex f041ebf..c36549f 100644\n--- a/Products/CMFDiffTool/ListDiff.py\n+++ b/Products/CMFDiffTool/ListDiff.py\n@@ -79,11 +79,11 @@ def _parseField(self, value, filename=None):\n if filename is None:\n # Since we only want to compare a single field, make a\n # one-item list out of it\n- return ["/".join(val.getPhysicalPath()) for val in value]\n+ return ["/".join(val.getPhysicalPath()) for val in value if val]\n else:\n return [\n self.filenameTitle(filename),\n- ["/".join(val.getPhysicalPath()) for val in value],\n+ ["/".join(val.getPhysicalPath()) for val in value if val],\n ]\n \n def inline_diff(self):\ndiff --git a/Products/CMFDiffTool/tests/test_dexteritydiff.py b/Products/CMFDiffTool/tests/test_dexteritydiff.py\nindex 48b6ae6..9492ac4 100644\n--- a/Products/CMFDiffTool/tests/test_dexteritydiff.py\n+++ b/Products/CMFDiffTool/tests/test_dexteritydiff.py\n@@ -154,3 +154,50 @@ def test_should_provide_diff_for_related_fields(self):\n i_add = n_diff.index("+")\n i_obj2 = n_diff.index("obj2")\n self.assertTrue(i_rem < i_obj1 < i_add < i_obj2)\n+\n+ def test_dont_break_on_broken_relations(self):\n+ """Diff should still render when a relation is broken"""\n+ intids = getUtility(IIntIds)\n+\n+ self.portal.invokeFactory(\n+ testing.TEST_CONTENT_TYPE_ID,\n+ "obj1",\n+ title="Object 1",\n+ description="Desc 1",\n+ text="Text 1",\n+ )\n+ obj1 = self.portal["obj1"]\n+\n+ intid = intids.register(obj1)\n+ self.portal.invokeFactory(\n+ testing.TEST_CONTENT_TYPE_ID,\n+ "obj2",\n+ title="Object 2",\n+ relatedItems=[RelationValue(intid)],\n+ )\n+ obj2 = self.portal["obj2"]\n+\n+ intid = intids.register(obj2)\n+ self.portal.invokeFactory(\n+ testing.TEST_CONTENT_TYPE_ID,\n+ "obj3",\n+ title="Object 3",\n+ relatedItems=[RelationValue(intid)],\n+ )\n+ obj3 = self.portal["obj3"]\n+\n+ obj2.relatedItems[0].broken("broken")\n+ self.assertTrue(obj2.relatedItems[0].isBroken())\n+\n+ diffs = DexterityCompoundDiff(obj2, obj3, "any")\n+ for d in diffs:\n+ if d.field == "relatedItems":\n+ inline_diff = d.inline_diff()\n+ self.assertTrue(inline_diff)\n+ self.assertIn(\'<div class="diff_add">\', inline_diff)\n+ self.assertIn("Object 2", inline_diff)\n+\n+ n_diff = d.ndiff()\n+ self.assertTrue(n_diff)\n+ self.assertIn("+", n_diff)\n+ self.assertIn("obj2", n_diff)\ndiff --git a/news/54.bugfix b/news/54.bugfix\nnew file mode 100644\nindex 0000000..d50edd6\n--- /dev/null\n+++ b/news/54.bugfix\n@@ -0,0 +1,2 @@\n+Make sure diff still renders when a relationlist has broken relations\n+[pbauer]\n' | ||
|
||
Repository: Products.CMFDiffTool | ||
|
||
|
||
Branch: refs/heads/master | ||
Date: 2024-02-19T19:21:04+01:00 | ||
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at> | ||
Commit: https://github.com/plone/Products.CMFDiffTool/commit/956ee77c24de7a4b2b87528bccddaba4923a9635 | ||
|
||
Merge pull request #53 from plone/pre-commit-ci-update-config | ||
|
||
[pre-commit.ci] pre-commit autoupdate | ||
|
||
Files changed: | ||
M .pre-commit-config.yaml | ||
M Products/CMFDiffTool/CMFDiffTool.py | ||
M Products/CMFDiffTool/__init__.py | ||
M Products/CMFDiffTool/libs/htmldiff.py | ||
M Products/CMFDiffTool/namedfile.py | ||
|
||
b'diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml\nindex aa2a758..e13b866 100644\n--- a/.pre-commit-config.yaml\n+++ b/.pre-commit-config.yaml\n@@ -16,7 +16,7 @@ repos:\n hooks:\n - id: isort\n - repo: https://github.com/psf/black\n- rev: 23.12.1\n+ rev: 24.1.1\n hooks:\n - id: black\n - repo: https://github.com/collective/zpretty\n@@ -32,7 +32,7 @@ repos:\n # """\n ##\n - repo: https://github.com/PyCQA/flake8\n- rev: 6.1.0\n+ rev: 7.0.0\n hooks:\n - id: flake8\n \ndiff --git a/Products/CMFDiffTool/CMFDiffTool.py b/Products/CMFDiffTool/CMFDiffTool.py\nindex 936c1ef..ed66d6a 100644\n--- a/Products/CMFDiffTool/CMFDiffTool.py\n+++ b/Products/CMFDiffTool/CMFDiffTool.py\n@@ -2,6 +2,7 @@\n \n Calculate differences between content objects\n """\n+\n from AccessControl import ClassSecurityInfo\n from AccessControl.class_init import InitializeClass\n from Acquisition import aq_base\ndiff --git a/Products/CMFDiffTool/__init__.py b/Products/CMFDiffTool/__init__.py\nindex 33fd937..75de100 100644\n--- a/Products/CMFDiffTool/__init__.py\n+++ b/Products/CMFDiffTool/__init__.py\n@@ -1,4 +1,5 @@\n """Initialize CMFDiffTool Product"""\n+\n # Set up a MessageFactory for the cmfdifftool domain\n from zope.i18nmessageid import MessageFactory\n \ndiff --git a/Products/CMFDiffTool/libs/htmldiff.py b/Products/CMFDiffTool/libs/htmldiff.py\nindex 107e71f..f6349ef 100644\n--- a/Products/CMFDiffTool/libs/htmldiff.py\n+++ b/Products/CMFDiffTool/libs/htmldiff.py\n@@ -10,6 +10,7 @@\n \n Better results if you use mxTidy first. The output is HTML.\n """\n+\n from difflib import SequenceMatcher\n from html import escape\n from io import StringIO\ndiff --git a/Products/CMFDiffTool/namedfile.py b/Products/CMFDiffTool/namedfile.py\nindex 1d1c0ef..671d00a 100644\n--- a/Products/CMFDiffTool/namedfile.py\n+++ b/Products/CMFDiffTool/namedfile.py\n@@ -70,9 +70,11 @@ def __init__(\n \n def _parseField(self, value, filename=None):\n return [\n- ""\n- if (value is None)\n- else named_file_as_str(NamedFile(data=value, filename=filename)),\n+ (\n+ ""\n+ if (value is None)\n+ else named_file_as_str(NamedFile(data=value, filename=filename))\n+ ),\n ]\n \n def inline_diff(self):\n' | ||
|