mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-13 18:50:53 +00:00
Rearrange imports
This commit is contained in:
parent
22731f3d26
commit
4a0b2e8791
5 changed files with 6 additions and 7 deletions
|
@ -29,11 +29,11 @@ import os
|
||||||
import signal
|
import signal
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
|
from types import FrameType
|
||||||
from typing import List, Optional, cast
|
from typing import List, Optional, cast
|
||||||
|
|
||||||
from radicale import VERSION, config, log, server, storage, types
|
from radicale import VERSION, config, log, server, storage, types
|
||||||
from radicale.log import logger
|
from radicale.log import logger
|
||||||
from types import FrameType
|
|
||||||
|
|
||||||
|
|
||||||
def run() -> None:
|
def run() -> None:
|
||||||
|
|
|
@ -21,13 +21,12 @@ import sys
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from typing import Optional
|
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,
|
from radicale import (auth, hook, config, httputils, pathutils, rights, storage,
|
||||||
types, web, xmlutils)
|
types, web, xmlutils)
|
||||||
from radicale.log import logger
|
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]
|
sys.modules["xml.etree"].ElementTree = ET # type:ignore[attr-defined]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -94,4 +94,4 @@ class ApplicationPartDelete(ApplicationBase):
|
||||||
for i in hook_notification_item_list:
|
for i in hook_notification_item_list:
|
||||||
self._hook.notify(i)
|
self._hook.notify(i)
|
||||||
headers = {"Content-Type": "text/xml; charset=%s" % self._encoding}
|
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)
|
||||||
|
|
|
@ -22,6 +22,7 @@ import posixpath
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
from http import client
|
from http import client
|
||||||
|
from types import TracebackType
|
||||||
from typing import Iterator, List, Mapping, MutableMapping, Optional, Tuple
|
from typing import Iterator, List, Mapping, MutableMapping, Optional, Tuple
|
||||||
|
|
||||||
import vobject
|
import vobject
|
||||||
|
@ -31,7 +32,6 @@ from radicale import httputils, pathutils, rights, storage, types, xmlutils
|
||||||
from radicale.app.base import Access, ApplicationBase
|
from radicale.app.base import Access, ApplicationBase
|
||||||
from radicale.hook import HookNotificationItem, HookNotificationItemTypes
|
from radicale.hook import HookNotificationItem, HookNotificationItemTypes
|
||||||
from radicale.log import logger
|
from radicale.log import logger
|
||||||
from types import TracebackType
|
|
||||||
|
|
||||||
MIMETYPE_TAGS: Mapping[str, str] = {value: key for key, value in
|
MIMETYPE_TAGS: Mapping[str, str] = {value: key for key, value in
|
||||||
xmlutils.MIMETYPES.items()}
|
xmlutils.MIMETYPES.items()}
|
||||||
|
|
|
@ -36,8 +36,8 @@ from typing import (Any, Callable, List, MutableMapping, Optional, Sequence,
|
||||||
|
|
||||||
import vobject
|
import vobject
|
||||||
|
|
||||||
from radicale import pathutils
|
|
||||||
from radicale import storage # noqa:F401
|
from radicale import storage # noqa:F401
|
||||||
|
from radicale import pathutils
|
||||||
from radicale.item import filter as radicale_filter
|
from radicale.item import filter as radicale_filter
|
||||||
from radicale.log import logger
|
from radicale.log import logger
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue