Skip to content

Commit

Permalink
black, flake8, zpretty
Browse files Browse the repository at this point in the history
  • Loading branch information
eikichi18 committed Aug 9, 2024
1 parent 09591a2 commit 7add554
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/design/plone/policy/profiles/default/registry.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
<element>data-element</element>
</value>
</records>

<record field="show_author_info"
interface="plone.base.interfaces.syndication.ISiteSyndicationSettings"
interface="plone.base.interfaces.syndication.ISiteSyndicationSettings"
name="plone.base.interfaces.syndication.ISiteSyndicationSettings.show_author_info"
purge="True"
>
Expand Down
4 changes: 3 additions & 1 deletion src/design/plone/policy/profiles/default/rolemap.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<rolemap>
<permissions>
<permission name="Access inactive portal content" acquire="True">
<permission acquire="True"
name="Access inactive portal content"
>
<role name="Editor" />
<role name="Owner" />
<role name="Reviewer" />
Expand Down
2 changes: 1 addition & 1 deletion src/design/plone/policy/restapi/search_filters/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/design/plone/policy/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/design/plone/policy/tests/test_initial_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions src/design/plone/policy/tests/test_registry_entries.py
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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
)
)
9 changes: 5 additions & 4 deletions src/design/plone/policy/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,7 +16,6 @@
from zope.component import getUtility
from zope.schema import getFields


import json
import logging

Expand Down Expand Up @@ -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 = []
Expand Down Expand Up @@ -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 = []
Expand Down

0 comments on commit 7add554

Please sign in to comment.