From 27137407c4436d7e91a266fa4b5bb6b95150c18f Mon Sep 17 00:00:00 2001 From: James Southern Date: Thu, 9 Aug 2018 21:22:38 +0100 Subject: [PATCH] Fix style issues flagged by pylama --- tildes/tildes/models/comment/comment_notification.py | 1 - tildes/tildes/resources/comment.py | 6 +++++- tildes/tildes/routes.py | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tildes/tildes/models/comment/comment_notification.py b/tildes/tildes/models/comment/comment_notification.py index 40eff23..2daca90 100644 --- a/tildes/tildes/models/comment/comment_notification.py +++ b/tildes/tildes/models/comment/comment_notification.py @@ -65,7 +65,6 @@ class CommentNotification(DatabaseModel): self.comment = comment self.notification_type = notification_type - def __acl__(self) -> Sequence[Tuple[str, Any, str]]: """Pyramid security ACL.""" acl = [] diff --git a/tildes/tildes/resources/comment.py b/tildes/tildes/resources/comment.py index 7bcfa4e..59283a3 100644 --- a/tildes/tildes/resources/comment.py +++ b/tildes/tildes/resources/comment.py @@ -21,6 +21,7 @@ def comment_by_id36(request: Request, comment_id36: str) -> Comment: return get_resource(request, query) + @use_kwargs( CommentSchema(only=('comment_id36',)), locations=('matchdict',), @@ -29,8 +30,11 @@ def notification_by_comment_id36( request: Request, comment_id36: str ) -> Comment: - """Get a comment notification specified by {comment_id36} in the route (or 404).""" + """Get a comment notification specified by {comment_id36} in the route. + Looks up a comment notification from the request user and a {comment_id36} + specified in the route. + """ if not request.user: raise HTTPForbidden diff --git a/tildes/tildes/routes.py b/tildes/tildes/routes.py index 1e2afd7..4b5522d 100644 --- a/tildes/tildes/routes.py +++ b/tildes/tildes/routes.py @@ -7,8 +7,8 @@ from pyramid.request import Request from pyramid.security import Allow, Authenticated from tildes.resources.comment import ( - comment_by_id36, - notification_by_comment_id36, + comment_by_id36, + notification_by_comment_id36, ) from tildes.resources.group import group_by_path from tildes.resources.message import message_conversation_by_id36