diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 38f35c0..b372374 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: types: [python] args: ["--max-complexity=30", "--max-line-length=88", "--ignore=E203,DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"] - repo: https://github.com/pycqa/isort - rev: 5.10.1 + rev: 5.13.2 hooks: - id: isort name: isort (python) diff --git a/src/design/plone/policy/profiles/default/registry.xml b/src/design/plone/policy/profiles/default/registry.xml index 347ab87..627d9f8 100644 --- a/src/design/plone/policy/profiles/default/registry.xml +++ b/src/design/plone/policy/profiles/default/registry.xml @@ -46,9 +46,9 @@ data-element - + diff --git a/src/design/plone/policy/profiles/default/rolemap.xml b/src/design/plone/policy/profiles/default/rolemap.xml index c261573..957db82 100644 --- a/src/design/plone/policy/profiles/default/rolemap.xml +++ b/src/design/plone/policy/profiles/default/rolemap.xml @@ -1,7 +1,9 @@ - + diff --git a/src/design/plone/policy/restapi/search_filters/get.py b/src/design/plone/policy/restapi/search_filters/get.py index 6b8f0d8..eda10cd 100644 --- a/src/design/plone/policy/restapi/search_filters/get.py +++ b/src/design/plone/policy/restapi/search_filters/get.py @@ -5,8 +5,8 @@ from plone.registry.interfaces import IRegistry from plone.restapi.interfaces import ISerializeToJsonSummary from plone.restapi.services import Service -from Products.CMFPlone.interfaces import ISearchSchema from Products.CMFCore.utils import getToolByName +from Products.CMFPlone.interfaces import ISearchSchema from zope.component import getMultiAdapter from zope.component import getUtility from zope.i18n import translate diff --git a/src/design/plone/policy/testing.py b/src/design/plone/policy/testing.py index 340ead9..ca18b2a 100644 --- a/src/design/plone/policy/testing.py +++ b/src/design/plone/policy/testing.py @@ -16,10 +16,10 @@ import collective.volto.dropdownmenu import collective.volto.formsupport import collective.volto.secondarymenu +import collective.volto.slimheader import collective.volto.socialsettings import collective.volto.subfooter import collective.volto.subsites -import collective.volto.slimheader import collective.z3cform.datagridfield import design.plone.contenttypes import design.plone.policy diff --git a/src/design/plone/policy/tests/test_initial_structure.py b/src/design/plone/policy/tests/test_initial_structure.py index 11f6ffa..9bfb1ab 100644 --- a/src/design/plone/policy/tests/test_initial_structure.py +++ b/src/design/plone/policy/tests/test_initial_structure.py @@ -7,8 +7,8 @@ from design.plone.policy.utils import TASSONOMIA_SERVIZI from plone.app.testing import setRoles from plone.app.testing import TEST_USER_ID -from plone.restapi.behaviors import IBlocks from plone.i18n.normalizer.interfaces import IURLNormalizer +from plone.restapi.behaviors import IBlocks from zope.component import getUtility import unittest diff --git a/src/design/plone/policy/tests/test_registry_entries.py b/src/design/plone/policy/tests/test_registry_entries.py index c60c41a..b1574fc 100644 --- a/src/design/plone/policy/tests/test_registry_entries.py +++ b/src/design/plone/policy/tests/test_registry_entries.py @@ -1,9 +1,8 @@ # -*- coding: utf-8 -*- +from design.plone.policy.testing import DESIGN_PLONE_POLICY_INTEGRATION_TESTING +from plone import api from plone.app.testing import setRoles from plone.app.testing import TEST_USER_ID -from plone import api - -from design.plone.policy.testing import DESIGN_PLONE_POLICY_INTEGRATION_TESTING import unittest @@ -17,11 +16,11 @@ def setUp(self): setRoles(self.portal, TEST_USER_ID, ["Manager"]) - def test_plone_base_interfaces_syndication_ISiteSyndicationSettings_show_author_info( + def test_plone_base_interfaces_syndication_ISiteSyndicationSettings_show_author_info( # noqa self, ): self.assertFalse( api.portal.get_registry_record( - "plone.base.interfaces.syndication.ISiteSyndicationSettings.show_author_info" + "plone.base.interfaces.syndication.ISiteSyndicationSettings.show_author_info" # noqa ) ) diff --git a/src/design/plone/policy/upgrades.py b/src/design/plone/policy/upgrades.py index 7c7ce07..b9d9b2e 100644 --- a/src/design/plone/policy/upgrades.py +++ b/src/design/plone/policy/upgrades.py @@ -2,10 +2,10 @@ from Acquisition import aq_base from collective.volto.blocksfield.field import BlocksField from copy import deepcopy +from design.plone.policy.interfaces import IDesignPlonePolicySettings from design.plone.policy.setuphandlers import disable_searchable_types from design.plone.policy.setuphandlers import set_default_subsite_colors from design.plone.policy.utils import create_default_blocks -from design.plone.policy.interfaces import IDesignPlonePolicySettings from plone import api from plone.app.upgrade.utils import installOrReinstallProduct from plone.dexterity.utils import iterSchemata @@ -16,7 +16,6 @@ from zope.component import getUtility from zope.schema import getFields - import json import logging @@ -375,7 +374,8 @@ def to_3101(context): for name, field in getFields(schema).items(): if name == "blocks": logger.info( - f"[3100 - 3101] Deleting twitter blocks if exist from {'/'.join(item.getPhysicalPath())}" + f"[3100 - 3101] Deleting twitter blocks if " + f"exist from {'/'.join(item.getPhysicalPath())}" ) twitter_block_uids = [] @@ -410,7 +410,8 @@ def to_3101(context): if blocks: logger.info( - f"[3100 - 3101] Deleting twitter blocks if exist from {'/'.join(item.getPhysicalPath())}" + f"[3100 - 3101] Deleting twitter blocks if " + f"exist from {'/'.join(item.getPhysicalPath())}" ) twitter_block_uids = []