WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 22bdbf3

Browse files
committed
lint
1 parent 962ef05 commit 22bdbf3

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/plone/app/content/browser/actions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ def handle_delete(self, action):
9999
registry = queryUtility(IRegistry)
100100
retention_period = registry["recyclebin-controlpanel.retention_period"]
101101

102-
message = get_recycle_bin_message(title=title, retention_period=retention_period)
102+
message = get_recycle_bin_message(
103+
title=title, retention_period=retention_period
104+
)
103105
IStatusMessage(self.request).add(message)
104106
else:
105107
IStatusMessage(self.request).add(

src/plone/app/content/browser/contents/delete.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from AccessControl import Unauthorized
22
from AccessControl.Permissions import delete_objects
33
from plone.app.content.browser.contents import ContentsBaseAction
4-
from plone.app.content.utils import get_recycle_bin_message
54
from plone.app.content.interfaces import IStructureAction
5+
from plone.app.content.utils import get_recycle_bin_message
66
from plone.base import PloneMessageFactory as _
77
from plone.base.interfaces.recyclebin import IRecycleBin
88
from plone.locking.interfaces import ILockable

src/plone/app/content/utils.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ def json_dumps(data):
4444

4545
def get_recycle_bin_message(title=None, retention_period=0):
4646
"""Generate appropriate message for recycled items based on retention period.
47-
47+
4848
Args:
4949
title: The title of the deleted item (optional, for single item messages)
5050
retention_period: Number of days to retain items (0 = indefinite)
51-
51+
5252
Returns:
5353
Translated message string
5454
"""
5555
from plone.base import PloneMessageFactory as _
56-
56+
5757
if title:
5858
# Single item message
5959
if retention_period == 0:
@@ -69,7 +69,9 @@ def get_recycle_bin_message(title=None, retention_period=0):
6969
else:
7070
# Multiple items message
7171
if retention_period == 0:
72-
return _("Successfully moved items to recycle bin. Items can be restored by administrators.")
72+
return _(
73+
"Successfully moved items to recycle bin. Items can be restored by administrators."
74+
)
7375
else:
7476
return _(
7577
"Successfully moved items to recycle bin. Items can be restored by administrators and will be permanently deleted after ${days} days.",

0 commit comments

Comments
 (0)