Make PyLint happy again

This commit is contained in:
Gergely Polonkai 2018-07-10 16:39:16 +02:00
parent f782ece010
commit 41f6c88df1
2 changed files with 7 additions and 3 deletions

View File

@ -334,8 +334,6 @@ class CalendarSocialApp(Flask):
"""View to accept an invitation """View to accept an invitation
""" """
from flask import redirect, url_for
from .models import db, Invitation, Response, ResponseType from .models import db, Invitation, Response, ResponseType
invitation = Invitation.query.get_or_404(invite_id) invitation = Invitation.query.get_or_404(invite_id)

View File

@ -307,6 +307,9 @@ class Profile(db.Model): # pylint: disable=too-few-public-methods
@property @property
def url(self): def url(self):
"""Get the URL for this profile
"""
from flask import url_for from flask import url_for
if self.user: if self.user:
@ -390,6 +393,9 @@ class Event(db.Model):
@property @property
def url(self): def url(self):
"""The URL of the event
"""
from flask import url_for from flask import url_for
return url_for('event_details', event_uuid=self.event_uuid) return url_for('event_details', event_uuid=self.event_uuid)
@ -609,7 +615,7 @@ class Notification(db.Model):
"""Get the translated message for ``key`` in HTML format """Get the translated message for ``key`` in HTML format
""" """
from flask import url_for, Markup from flask import Markup
from flask_security import current_user from flask_security import current_user
messages = NOTIFICATION_ACTION_MESSAGES.get(self.action) messages = NOTIFICATION_ACTION_MESSAGES.get(self.action)