From e626239d8484eecd9d2b9a76199ca800e357f26e Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Thu, 25 Nov 2021 15:44:37 +0100 Subject: [PATCH] [cleanup] Minor pep8 cleanup --- flaschengeist/plugins/auth_ldap/__init__.py | 2 +- .../plugins/events/event_controller.py | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/flaschengeist/plugins/auth_ldap/__init__.py b/flaschengeist/plugins/auth_ldap/__init__.py index ebe84c3..29659bf 100644 --- a/flaschengeist/plugins/auth_ldap/__init__.py +++ b/flaschengeist/plugins/auth_ldap/__init__.py @@ -114,7 +114,7 @@ class AuthLDAP(AuthPlugin): } ) if user.display_name: - attributes.update( {"displayName": user.display_name}) + attributes.update({"displayName": user.display_name}) ldap_conn.add(dn, self.object_classes, attributes) self._set_roles(user) self.update_user(user) diff --git a/flaschengeist/plugins/events/event_controller.py b/flaschengeist/plugins/events/event_controller.py index 46dcb33..432a5a8 100644 --- a/flaschengeist/plugins/events/event_controller.py +++ b/flaschengeist/plugins/events/event_controller.py @@ -336,7 +336,16 @@ def respond_invitation(invite: Invitation, accepted=True): raise Conflict if not accepted: - EventPlugin.plugin.notify(inviter, _("Invitation rejected"), {"type": NotifyType.INVITATION_REJECTED, "event": job.event_id_, "job": invite.job_id, "invitee": invite.invitee_id}) + EventPlugin.plugin.notify( + inviter, + _("Invitation rejected"), + { + "type": NotifyType.INVITATION_REJECTED, + "event": job.event_id_, + "job": invite.job_id, + "invitee": invite.invitee_id, + }, + ) else: if invite.transferee_id is None: assign_job(job, invite.invitee_, 1) @@ -346,7 +355,16 @@ def respond_invitation(invite: Invitation, accepted=True): raise Conflict unassign_job(job, invite.transferee_, service[0], True) assign_job(job, invite.invitee_, service[0].value) - EventPlugin.plugin.notify(inviter, _("Invitation accepted"), {"type": NotifyType.INVITATION_ACCEPTED, "event": job.event_id_, "job": invite.job_id, "invitee": invite.invitee_id}) + EventPlugin.plugin.notify( + inviter, + _("Invitation accepted"), + { + "type": NotifyType.INVITATION_ACCEPTED, + "event": job.event_id_, + "job": invite.job_id, + "invitee": invite.invitee_id, + }, + ) @scheduled