File tree 15 files changed +24
-11
lines changed
15 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 16
16
hooks :
17
17
- id : isort
18
18
- repo : https://github.com/psf/black
19
- rev : 23.12 .1
19
+ rev : 24.1 .1
20
20
hooks :
21
21
- id : black
22
22
- repo : https://github.com/collective/zpretty
32
32
# """
33
33
# #
34
34
- repo : https://github.com/PyCQA/flake8
35
- rev : 6.1 .0
35
+ rev : 7.0 .0
36
36
hooks :
37
37
- id : flake8
38
38
Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ def updateFields(self):
41
41
self .fields ["globally_enabled" ].widgetFactory = SingleCheckBoxFieldWidget
42
42
self .fields ["moderation_enabled" ].widgetFactory = SingleCheckBoxFieldWidget
43
43
self .fields ["edit_comment_enabled" ].widgetFactory = SingleCheckBoxFieldWidget
44
- self .fields [
45
- "delete_own_comment_enabled"
46
- ]. widgetFactory = SingleCheckBoxFieldWidget
44
+ self .fields ["delete_own_comment_enabled" ]. widgetFactory = (
45
+ SingleCheckBoxFieldWidget
46
+ )
47
47
self .fields ["anonymous_comments" ].widgetFactory = SingleCheckBoxFieldWidget
48
48
self .fields ["show_commenter_image" ].widgetFactory = SingleCheckBoxFieldWidget
49
- self .fields [
50
- "moderator_notification_enabled"
51
- ]. widgetFactory = SingleCheckBoxFieldWidget
52
- self .fields [
53
- "user_notification_enabled"
54
- ]. widgetFactory = SingleCheckBoxFieldWidget
49
+ self .fields ["moderator_notification_enabled" ]. widgetFactory = (
50
+ SingleCheckBoxFieldWidget
51
+ )
52
+ self .fields ["user_notification_enabled" ]. widgetFactory = (
53
+ SingleCheckBoxFieldWidget
54
+ )
55
55
56
56
def updateWidgets (self ):
57
57
try :
Original file line number Diff line number Diff line change 2
2
IDiscussion container for the context, from which traversal will continue
3
3
into an actual comment object.
4
4
"""
5
+
5
6
from plone .app .discussion .interfaces import IConversation
6
7
from zope .component import adapter
7
8
from zope .component import queryAdapter
Original file line number Diff line number Diff line change 1
1
"""Captcha validator, see captcha.txt for design notes.
2
2
"""
3
+
3
4
from Acquisition import aq_inner
4
5
from plone .app .discussion .interfaces import ICaptcha
5
6
from plone .app .discussion .interfaces import IDiscussionLayer
Original file line number Diff line number Diff line change 3
3
4
4
Also provide event handlers to actually catalog the comments.
5
5
"""
6
+
6
7
from plone .app .discussion .interfaces import IComment
7
8
from plone .app .discussion .interfaces import IConversation
8
9
from plone .app .event .base import DT
Original file line number Diff line number Diff line change 1
1
"""The default comment class and factory.
2
2
"""
3
+
3
4
from AccessControl import ClassSecurityInfo
4
5
from AccessControl .SecurityManagement import getSecurityManager
5
6
from Acquisition import aq_base
Original file line number Diff line number Diff line change 1
1
""" Content rules handlers
2
2
"""
3
+
3
4
from plone .app .discussion import _
4
5
5
6
Original file line number Diff line number Diff line change 9
9
manipulating the comments directly in reply to a particular comment or at the
10
10
top level of the conversation.
11
11
"""
12
+
12
13
from .comment import Comment
13
14
from .interfaces import DISCUSSION_ANNOTATION_KEY as ANNOTATION_KEY
14
15
from .interfaces import IConversation
Original file line number Diff line number Diff line change 1
1
""" Custom discussion events
2
2
"""
3
+
3
4
from plone .app .discussion .interfaces import ICommentAddedEvent
4
5
from plone .app .discussion .interfaces import ICommentDeletedEvent
5
6
from plone .app .discussion .interfaces import ICommentModifiedEvent
Original file line number Diff line number Diff line change 1
1
"""Interfaces for plone.app.discussion
2
2
"""
3
+
3
4
from plone .app .discussion import _
4
5
from Products .CMFCore .interfaces import ISiteRoot
5
6
from Products .CMFCore .utils import getToolByName
Original file line number Diff line number Diff line change 1
1
"""Test the plone.app.discussion catalog indexes
2
2
"""
3
+
3
4
from datetime import datetime
4
5
from datetime import timezone
5
6
from plone .app .discussion .interfaces import IConversation
Original file line number Diff line number Diff line change 2
2
3
3
These test are only triggered when Plone 4 (and plone.testing) is installed.
4
4
"""
5
+
5
6
from ..testing import PLONE_APP_DISCUSSION_FUNCTIONAL_TESTING # noqa
6
7
from plone .testing import layered
7
8
Original file line number Diff line number Diff line change 1
1
"""Test for the plone.app.discussion indexers
2
2
"""
3
+
3
4
from .. import catalog
4
5
from ..interfaces import IConversation
5
6
from ..testing import PLONE_APP_DISCUSSION_INTEGRATION_TESTING # noqa
Original file line number Diff line number Diff line change 1
1
"""Test plone.app.discussion workflow and permissions.
2
2
"""
3
+
3
4
from ..interfaces import IConversation
4
5
from ..interfaces import IDiscussionLayer
5
6
from ..testing import PLONE_APP_DISCUSSION_INTEGRATION_TESTING
Original file line number Diff line number Diff line change 4
4
5
5
BBB support for the old portal_discussion is provided in the bbb package.
6
6
"""
7
+
7
8
from .interfaces import IComment
8
9
from .interfaces import ICommentingTool
9
10
from OFS .SimpleItem import SimpleItem
You can’t perform that action at this time.
0 commit comments