chore: sort imports (#413)
This commit is contained in:
@@ -115,3 +115,6 @@ line-length = 88
|
|||||||
ignore = [
|
ignore = [
|
||||||
"F821", # undefined names are used for decorators
|
"F821", # undefined names are used for decorators
|
||||||
]
|
]
|
||||||
|
select = [
|
||||||
|
"I", # isort formatting.
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from struct import Struct, error
|
from struct import Struct, error
|
||||||
from typing import Any, Callable
|
from typing import Any, Callable
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import socket
|
|||||||
import sys
|
import sys
|
||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
from struct import Struct
|
from struct import Struct
|
||||||
from typing import Any, Callable, TYPE_CHECKING
|
from typing import TYPE_CHECKING, Any, Callable
|
||||||
|
|
||||||
from ..constants import MESSAGE_FLAG_MAP, MESSAGE_TYPE_MAP, MessageFlag
|
from ..constants import MESSAGE_FLAG_MAP, MESSAGE_TYPE_MAP, MessageFlag
|
||||||
from ..errors import InvalidMessageError
|
from ..errors import InvalidMessageError
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import ast
|
|||||||
import inspect
|
import inspect
|
||||||
from typing import Any, Callable
|
from typing import Any, Callable
|
||||||
|
|
||||||
from ..signature import SignatureTree, Variant, get_signature_tree, SignatureType
|
from ..signature import SignatureTree, SignatureType, Variant, get_signature_tree
|
||||||
|
|
||||||
|
|
||||||
def signature_contains_type(
|
def signature_contains_type(
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
from .message_bus import MessageBus as MessageBus
|
from .message_bus import MessageBus as MessageBus
|
||||||
from .proxy_object import ProxyInterface as ProxyInterface, ProxyObject as ProxyObject
|
from .proxy_object import ProxyInterface as ProxyInterface
|
||||||
|
from .proxy_object import ProxyObject as ProxyObject
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
from .message_bus import MessageBus as MessageBus
|
from .message_bus import MessageBus as MessageBus
|
||||||
from .proxy_object import ProxyInterface as ProxyInterface, ProxyObject as ProxyObject
|
from .proxy_object import ProxyInterface as ProxyInterface
|
||||||
|
from .proxy_object import ProxyObject as ProxyObject
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
import traceback
|
import traceback
|
||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from typing import Any, Callable, TYPE_CHECKING
|
from typing import TYPE_CHECKING, Any, Callable
|
||||||
|
|
||||||
from . import introspection as intr
|
from . import introspection as intr
|
||||||
from ._private.address import get_bus_address, parse_address
|
from ._private.address import get_bus_address, parse_address
|
||||||
@@ -23,7 +24,7 @@ from .errors import DBusError, InvalidAddressError
|
|||||||
from .message import Message
|
from .message import Message
|
||||||
from .proxy_object import BaseProxyObject
|
from .proxy_object import BaseProxyObject
|
||||||
from .send_reply import SendReply
|
from .send_reply import SendReply
|
||||||
from .service import ServiceInterface, _Method, _Property, HandlerType
|
from .service import HandlerType, ServiceInterface, _Method, _Property
|
||||||
from .signature import Variant
|
from .signature import Variant
|
||||||
from .validators import assert_bus_name_valid, assert_object_path_valid
|
from .validators import assert_bus_name_valid, assert_object_path_valid
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
from types import TracebackType
|
from types import TracebackType
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
import copy
|
import copy
|
||||||
import inspect
|
import inspect
|
||||||
@@ -15,13 +16,13 @@ from ._private.util import (
|
|||||||
from .constants import PropertyAccess
|
from .constants import PropertyAccess
|
||||||
from .errors import SignalDisabledError
|
from .errors import SignalDisabledError
|
||||||
from .message import Message
|
from .message import Message
|
||||||
|
from .send_reply import SendReply
|
||||||
from .signature import (
|
from .signature import (
|
||||||
SignatureBodyMismatchError,
|
SignatureBodyMismatchError,
|
||||||
SignatureTree,
|
SignatureTree,
|
||||||
Variant,
|
Variant,
|
||||||
get_signature_tree,
|
get_signature_tree,
|
||||||
)
|
)
|
||||||
from .send_reply import SendReply
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .message_bus import BaseMessageBus
|
from .message_bus import BaseMessageBus
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from dbus_fast import Message
|
|
||||||
from pytest_codspeed import BenchmarkFixture
|
from pytest_codspeed import BenchmarkFixture
|
||||||
|
|
||||||
|
from dbus_fast import Message
|
||||||
|
|
||||||
message = Message(
|
message = Message(
|
||||||
destination="org.bluez",
|
destination="org.bluez",
|
||||||
path="/",
|
path="/",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import io
|
import io
|
||||||
|
|
||||||
from dbus_fast._private.unmarshaller import Unmarshaller
|
|
||||||
|
|
||||||
from pytest_codspeed import BenchmarkFixture
|
from pytest_codspeed import BenchmarkFixture
|
||||||
|
|
||||||
|
from dbus_fast._private.unmarshaller import Unmarshaller
|
||||||
|
|
||||||
|
|
||||||
def test_unmarshall_bluez_rssi_message(benchmark: BenchmarkFixture) -> None:
|
def test_unmarshall_bluez_rssi_message(benchmark: BenchmarkFixture) -> None:
|
||||||
bluez_rssi_message = (
|
bluez_rssi_message = (
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import os
|
|||||||
|
|
||||||
from dbus_fast import (
|
from dbus_fast import (
|
||||||
ArgDirection,
|
ArgDirection,
|
||||||
|
InvalidMemberNameError,
|
||||||
PropertyAccess,
|
PropertyAccess,
|
||||||
SignatureType,
|
SignatureType,
|
||||||
InvalidMemberNameError,
|
|
||||||
)
|
)
|
||||||
from dbus_fast import introspection as intr
|
from dbus_fast import introspection as intr
|
||||||
|
|
||||||
|
|||||||
@@ -8,15 +8,14 @@ import pytest
|
|||||||
|
|
||||||
from dbus_fast import Message, MessageFlag, MessageType, SignatureTree, Variant
|
from dbus_fast import Message, MessageFlag, MessageType, SignatureTree, Variant
|
||||||
from dbus_fast._private._cython_compat import FakeCython
|
from dbus_fast._private._cython_compat import FakeCython
|
||||||
|
from dbus_fast._private.constants import BIG_ENDIAN, LITTLE_ENDIAN
|
||||||
from dbus_fast._private.unmarshaller import (
|
from dbus_fast._private.unmarshaller import (
|
||||||
Unmarshaller,
|
Unmarshaller,
|
||||||
is_compiled,
|
|
||||||
buffer_to_int16,
|
buffer_to_int16,
|
||||||
buffer_to_uint32,
|
|
||||||
buffer_to_uint16,
|
buffer_to_uint16,
|
||||||
|
buffer_to_uint32,
|
||||||
|
is_compiled,
|
||||||
)
|
)
|
||||||
from dbus_fast._private.constants import BIG_ENDIAN, LITTLE_ENDIAN
|
|
||||||
|
|
||||||
from dbus_fast.unpack import unpack_variants
|
from dbus_fast.unpack import unpack_variants
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import os
|
import os
|
||||||
|
from contextlib import suppress
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from contextlib import suppress
|
|
||||||
from dbus_fast import Message
|
from dbus_fast import Message
|
||||||
from dbus_fast._private.address import parse_address
|
from dbus_fast._private.address import parse_address
|
||||||
from dbus_fast.aio import MessageBus
|
from dbus_fast.aio import MessageBus
|
||||||
|
|||||||
Reference in New Issue
Block a user