From b2a0067a57fce2df7d36b6613e25f3cc1d0c62b1 Mon Sep 17 00:00:00 2001 From: Tuna Celik Date: Mon, 17 Aug 2020 02:36:22 +0200 Subject: [PATCH] Refactoring --- radicale/app/delete.py | 8 ++++---- radicale/app/put.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/radicale/app/delete.py b/radicale/app/delete.py index c27b3917..fc748030 100644 --- a/radicale/app/delete.py +++ b/radicale/app/delete.py @@ -66,14 +66,14 @@ class ApplicationDeleteMixin: if isinstance(item, storage.BaseCollection): xml_answer = xml_delete(base_prefix, path, item) for item in item.get_all(): - hook_notification_item = \ - HookNotificationItem(HookNotificationItemTypes.DELETE, item.uid) + hook_notification_item = HookNotificationItem( + HookNotificationItemTypes.DELETE, item.uid) self._hook.notify(hook_notification_item) else: xml_answer = xml_delete( base_prefix, path, item.collection, item.href) - hook_notification_item = \ - HookNotificationItem(HookNotificationItemTypes.DELETE, item.uid) + hook_notification_item = HookNotificationItem( + HookNotificationItemTypes.DELETE, item.uid) self._hook.notify(hook_notification_item) headers = {"Content-Type": "text/xml; charset=%s" % self._encoding} return client.OK, headers, self._write_xml_content(xml_answer) diff --git a/radicale/app/put.py b/radicale/app/put.py index dcea4516..69537799 100644 --- a/radicale/app/put.py +++ b/radicale/app/put.py @@ -195,8 +195,8 @@ class ApplicationPutMixin: etag = self._storage.create_collection( path, prepared_items, props).etag for item in prepared_items: - hook_notification_item = \ - HookNotificationItem(HookNotificationItemTypes.UPSERT, item.serialize()) + hook_notification_item = HookNotificationItem( + HookNotificationItemTypes.UPSERT, item.serialize()) self._hook.notify(hook_notification_item) except ValueError as e: logger.warning( @@ -213,8 +213,8 @@ class ApplicationPutMixin: href = posixpath.basename(pathutils.strip_path(path)) try: etag = parent_item.upload(href, prepared_item).etag - hook_notification_item = \ - HookNotificationItem(HookNotificationItemTypes.UPSERT, prepared_item.serialize()) + hook_notification_item = HookNotificationItem( + HookNotificationItemTypes.UPSERT, prepared_item.serialize()) self._hook.notify(hook_notification_item) except ValueError as e: logger.warning(