From 6b1cba2d21a463136341c866bce720af4f3ad086 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:32:29 +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: - [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) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index caf34e5b..f857b483 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,7 +16,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.1.1 hooks: - id: black - repo: https://github.com/collective/zpretty @@ -32,7 +32,7 @@ repos: # """ ## - repo: https://github.com/PyCQA/flake8 - rev: 6.1.0 + rev: 7.0.0 hooks: - id: flake8 From 8e411ded7d6fd5f90b7b95ca6efb26796d6490d0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 18:34:21 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- plone/app/contenttypes/tests/test_event.py | 36 +++++++++---------- plone/app/contenttypes/tests/test_link.py | 18 +++++----- .../app/contenttypes/tests/test_news_item.py | 30 ++++++++-------- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/plone/app/contenttypes/tests/test_event.py b/plone/app/contenttypes/tests/test_event.py index 2ce96911..528059a9 100644 --- a/plone/app/contenttypes/tests/test_event.py +++ b/plone/app/contenttypes/tests/test_event.py @@ -91,24 +91,24 @@ def setUp(self): def test_add_event(self): self.browser.open(self.portal_url) self.browser.getLink("Event").click() - self.browser.getControl( - name="form.widgets.IDublinCore.title" - ).value = "My event" - self.browser.getControl( - name="form.widgets.IDublinCore.description" - ).value = "This is my event." - self.browser.getControl( - name="form.widgets.IRichTextBehavior.text" - ).value = "Lorem Ipsum" - self.browser.getControl( - name="form.widgets.IEventBasic.start" - ).value = "2013-01-01" - self.browser.getControl( - name="form.widgets.IEventBasic.end" - ).value = "2013-01-12" - self.browser.getControl( - name="form.widgets.IShortName.id" - ).value = "my-special-event" + self.browser.getControl(name="form.widgets.IDublinCore.title").value = ( + "My event" + ) + self.browser.getControl(name="form.widgets.IDublinCore.description").value = ( + "This is my event." + ) + self.browser.getControl(name="form.widgets.IRichTextBehavior.text").value = ( + "Lorem Ipsum" + ) + self.browser.getControl(name="form.widgets.IEventBasic.start").value = ( + "2013-01-01" + ) + self.browser.getControl(name="form.widgets.IEventBasic.end").value = ( + "2013-01-12" + ) + self.browser.getControl(name="form.widgets.IShortName.id").value = ( + "my-special-event" + ) self.browser.getControl("Save").click() self.assertTrue(self.browser.url.endswith("my-special-event/view")) diff --git a/plone/app/contenttypes/tests/test_link.py b/plone/app/contenttypes/tests/test_link.py index 702e4d99..dabdd9a8 100644 --- a/plone/app/contenttypes/tests/test_link.py +++ b/plone/app/contenttypes/tests/test_link.py @@ -379,15 +379,15 @@ def test_add_link(self): self.browser.open(self.portal_url) self.browser.getLink("Link").click() self.browser.getControl(name="form.widgets.IDublinCore.title").value = "My link" - self.browser.getControl( - name="form.widgets.IDublinCore.description" - ).value = "This is my link." - self.browser.getControl( - name="form.widgets.IShortName.id" - ).value = "my-special-link" - self.browser.getControl( - name="form.widgets.remoteUrl.external" - ).value = "https://plone.org" + self.browser.getControl(name="form.widgets.IDublinCore.description").value = ( + "This is my link." + ) + self.browser.getControl(name="form.widgets.IShortName.id").value = ( + "my-special-link" + ) + self.browser.getControl(name="form.widgets.remoteUrl.external").value = ( + "https://plone.org" + ) self.browser.getControl("Save").click() self.assertTrue(self.browser.url.endswith("my-special-link/view")) diff --git a/plone/app/contenttypes/tests/test_news_item.py b/plone/app/contenttypes/tests/test_news_item.py index 9bab672b..09ff40de 100644 --- a/plone/app/contenttypes/tests/test_news_item.py +++ b/plone/app/contenttypes/tests/test_news_item.py @@ -112,16 +112,16 @@ def setUp(self): def test_add_news_item(self): self.browser.open(self.portal_url) self.browser.getLink("News Item").click() - self.browser.getControl( - name="form.widgets.IDublinCore.title" - ).value = "My news item" - self.browser.getControl( - name="form.widgets.IDublinCore.description" - ).value = "This is my news item." + self.browser.getControl(name="form.widgets.IDublinCore.title").value = ( + "My news item" + ) + self.browser.getControl(name="form.widgets.IDublinCore.description").value = ( + "This is my news item." + ) self.browser.getControl(name="form.widgets.IShortName.id").value = "" - self.browser.getControl( - name="form.widgets.IRichTextBehavior.text" - ).value = "Lorem Ipsum" + self.browser.getControl(name="form.widgets.IRichTextBehavior.text").value = ( + "Lorem Ipsum" + ) self.browser.getControl("Save").click() self.assertTrue(self.browser.url.endswith("my-news-item/view")) @@ -132,12 +132,12 @@ def test_add_news_item(self): def test_add_news_item_with_shortname(self): self.browser.open(self.portal_url) self.browser.getLink("News Item").click() - self.browser.getControl( - name="form.widgets.IDublinCore.title" - ).value = "My news item" - self.browser.getControl( - name="form.widgets.IShortName.id" - ).value = "my-special-news" + self.browser.getControl(name="form.widgets.IDublinCore.title").value = ( + "My news item" + ) + self.browser.getControl(name="form.widgets.IShortName.id").value = ( + "my-special-news" + ) self.browser.getControl("Save").click() self.assertTrue(self.browser.url.endswith("my-special-news/view"))