1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-09-15 20:36:55 +00:00

Rearrange imports

This commit is contained in:
Tuna Celik 2023-02-10 23:32:32 +01:00
parent 22731f3d26
commit 4a0b2e8791
5 changed files with 6 additions and 7 deletions

View file

@ -21,13 +21,12 @@ import sys
import xml.etree.ElementTree as ET
from typing import Optional
# HACK: https://github.com/tiran/defusedxml/issues/54
import defusedxml.ElementTree as DefusedET # isort:skip
from radicale import (auth, hook, config, httputils, pathutils, rights, storage,
types, web, xmlutils)
from radicale.log import logger
# HACK: https://github.com/tiran/defusedxml/issues/54
import defusedxml.ElementTree as DefusedET # isort:skip
sys.modules["xml.etree"].ElementTree = ET # type:ignore[attr-defined]

View file

@ -94,4 +94,4 @@ class ApplicationPartDelete(ApplicationBase):
for i in hook_notification_item_list:
self._hook.notify(i)
headers = {"Content-Type": "text/xml; charset=%s" % self._encoding}
return client.OK, headers, self._write_xml_content(xml_answer)
return client.OK, headers, self._xml_response(xml_answer)

View file

@ -22,6 +22,7 @@ import posixpath
import socket
import sys
from http import client
from types import TracebackType
from typing import Iterator, List, Mapping, MutableMapping, Optional, Tuple
import vobject
@ -31,7 +32,6 @@ from radicale import httputils, pathutils, rights, storage, types, xmlutils
from radicale.app.base import Access, ApplicationBase
from radicale.hook import HookNotificationItem, HookNotificationItemTypes
from radicale.log import logger
from types import TracebackType
MIMETYPE_TAGS: Mapping[str, str] = {value: key for key, value in
xmlutils.MIMETYPES.items()}