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 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"))