chore(pre-commit.ci): pre-commit autoupdate (#427)
* chore(pre-commit.ci): pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.1.0 → v0.11.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.0...v0.11.0) * chore(pre-commit.ci): auto fixes * chore: fix violations --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
committed by
GitHub
parent
28615ee7eb
commit
bfc8151005
@@ -1,6 +1,7 @@
|
||||
from dbus_fast import Message
|
||||
from pytest_codspeed import BenchmarkFixture
|
||||
|
||||
from dbus_fast import Message
|
||||
|
||||
message = Message(
|
||||
destination="org.bluez",
|
||||
path="/",
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import io
|
||||
|
||||
from dbus_fast._private.unmarshaller import Unmarshaller
|
||||
from pytest_codspeed import BenchmarkFixture
|
||||
|
||||
from dbus_fast._private.unmarshaller import Unmarshaller
|
||||
|
||||
|
||||
def test_unmarshall_bluez_rssi_message(benchmark: BenchmarkFixture) -> None:
|
||||
bluez_rssi_message = (
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import aio
|
||||
from dbus_fast.service import ServiceInterface
|
||||
|
||||
|
||||
@@ -3,13 +3,13 @@ import sys
|
||||
from logging.handlers import QueueHandler
|
||||
from queue import SimpleQueue
|
||||
|
||||
import dbus_fast.introspection as intr
|
||||
import pytest
|
||||
|
||||
import dbus_fast.introspection as intr
|
||||
from dbus_fast import DBusError, aio, glib
|
||||
from dbus_fast.message import MessageFlag
|
||||
from dbus_fast.service import ServiceInterface, method
|
||||
from dbus_fast.signature import Variant
|
||||
|
||||
from tests.util import check_gi_repository, skip_reason_no_gi
|
||||
|
||||
has_gi = check_gi_repository()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import DBusError, Message, aio, glib
|
||||
from dbus_fast.service import PropertyAccess, ServiceInterface, dbus_property
|
||||
from dbus_fast.signature import Variant
|
||||
|
||||
from tests.util import check_gi_repository, skip_reason_no_gi
|
||||
|
||||
has_gi = check_gi_repository()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message
|
||||
from dbus_fast.aio import MessageBus
|
||||
from dbus_fast.constants import RequestNameReply
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageType
|
||||
from dbus_fast import introspection as intr
|
||||
from dbus_fast.aio import MessageBus
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import (
|
||||
DBusError,
|
||||
ErrorType,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import (
|
||||
DBusError,
|
||||
ErrorType,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageType
|
||||
from dbus_fast.aio import MessageBus
|
||||
from dbus_fast.constants import PropertyAccess
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageType
|
||||
from dbus_fast import introspection as intr
|
||||
from dbus_fast.aio import MessageBus
|
||||
|
||||
@@ -2,6 +2,7 @@ import os
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast._private.address import (
|
||||
get_bus_address,
|
||||
get_session_bus_address,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageFlag, MessageType
|
||||
from dbus_fast.aio import MessageBus
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast.aio import MessageBus
|
||||
from dbus_fast.service import ServiceInterface, method
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""This tests setting a hardcoded UID in AuthExternal"""
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast.auth import (
|
||||
UID_NOT_SPECIFIED,
|
||||
AuthAnnonymous,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageType, aio, glib
|
||||
from dbus_fast.service import ServiceInterface, method
|
||||
|
||||
from tests.util import check_gi_repository, skip_reason_no_gi
|
||||
|
||||
has_gi = check_gi_repository()
|
||||
|
||||
@@ -2,6 +2,7 @@ import asyncio
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message
|
||||
from dbus_fast.aio import MessageBus
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageType
|
||||
from dbus_fast.aio import MessageBus
|
||||
from dbus_fast.service import ServiceInterface, dbus_property, method, signal
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageFlag, MessageType
|
||||
from dbus_fast.glib import MessageBus
|
||||
|
||||
from tests.util import check_gi_repository, skip_reason_no_gi
|
||||
|
||||
has_gi = check_gi_repository()
|
||||
|
||||
@@ -5,6 +5,7 @@ from enum import Enum
|
||||
from typing import Any
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message, MessageFlag, MessageType, SignatureTree, Variant
|
||||
from dbus_fast._private._cython_compat import FakeCython
|
||||
from dbus_fast._private.constants import BIG_ENDIAN, LITTLE_ENDIAN
|
||||
@@ -233,9 +234,9 @@ def test_unmarshalling_with_table(unmarshall_table):
|
||||
"flags",
|
||||
"serial",
|
||||
]:
|
||||
assert getattr(unmarshaller.message, attr) == getattr(
|
||||
message, attr
|
||||
), f"attr doesnt match: {attr}"
|
||||
assert getattr(unmarshaller.message, attr) == getattr(message, attr), (
|
||||
f"attr doesnt match: {attr}"
|
||||
)
|
||||
|
||||
|
||||
def test_unmarshall_can_resume():
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import (
|
||||
Message,
|
||||
MessageType,
|
||||
@@ -10,7 +11,6 @@ from dbus_fast import (
|
||||
aio,
|
||||
glib,
|
||||
)
|
||||
|
||||
from tests.util import check_gi_repository, skip_reason_no_gi
|
||||
|
||||
has_gi = check_gi_repository()
|
||||
|
||||
@@ -2,6 +2,7 @@ import os
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast.constants import ErrorType, MessageType
|
||||
from dbus_fast.errors import DBusError
|
||||
from dbus_fast.message import Message
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
|
||||
from dbus_fast import SignatureBodyMismatchError, SignatureTree, Variant
|
||||
from dbus_fast._private.util import signature_contains_type
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import os
|
||||
from contextlib import suppress
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast import Message
|
||||
from dbus_fast._private.address import parse_address
|
||||
from dbus_fast.aio import MessageBus
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"""Test unpack variants."""
|
||||
|
||||
import pytest
|
||||
|
||||
from dbus_fast.signature import Variant
|
||||
from dbus_fast.unpack import unpack_variants
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@ def test_interface_name_validator():
|
||||
]
|
||||
|
||||
for name in valid_names:
|
||||
assert is_interface_name_valid(
|
||||
name
|
||||
), f'interface name should be valid: "{name}"'
|
||||
assert is_interface_name_valid(name), (
|
||||
f'interface name should be valid: "{name}"'
|
||||
)
|
||||
for name in invalid_names:
|
||||
assert not is_interface_name_valid(
|
||||
name
|
||||
), f'interface name should be invalid: "{name}"'
|
||||
assert not is_interface_name_valid(name), (
|
||||
f'interface name should be invalid: "{name}"'
|
||||
)
|
||||
|
||||
|
||||
def test_member_name_validator():
|
||||
@@ -82,6 +82,6 @@ def test_member_name_validator():
|
||||
for member in valid_members:
|
||||
assert is_member_name_valid(member), f'member name should be valid: "{member}"'
|
||||
for member in invalid_members:
|
||||
assert not is_member_name_valid(
|
||||
member
|
||||
), f'member name should be invalid: "{member}"'
|
||||
assert not is_member_name_valid(member), (
|
||||
f'member name should be invalid: "{member}"'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user