From 5cc40789362464706169459221d2241fa83c5685 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 08:17:24 +0100 Subject: [PATCH] Bump ruff from 0.7.4 to 0.8.0 (#1606) * Bump ruff from 0.7.4 to 0.8.0 Bumps [ruff](https://github.com/astral-sh/ruff) from 0.7.4 to 0.8.0. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/0.7.4...0.8.0) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * ruff fix * use latest python for test coverage report --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: farmio --- .github/workflows/ci.yml | 2 +- requirements/testing.txt | 2 +- test/conftest.py | 2 +- xknx/devices/__init__.py | 4 ++-- xknx/devices/travelcalculator.py | 6 +++--- xknx/exceptions/__init__.py | 8 ++++---- xknx/io/__init__.py | 10 +++++----- xknx/knxip/__init__.py | 28 ++++++++++++++-------------- xknx/remote_value/__init__.py | 4 ++-- xknx/secure/__init__.py | 2 +- xknx/secure/data_secure_asdu.py | 4 ++-- xknx/telegram/__init__.py | 2 +- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77d8ac8c..405847276 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: needs: ["build"] strategy: matrix: - python-version: ["3.12"] + python-version: ["3.13"] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/requirements/testing.txt b/requirements/testing.txt index b11cc18ff..9617d28b3 100644 --- a/requirements/testing.txt +++ b/requirements/testing.txt @@ -7,7 +7,7 @@ pytest==8.3.3 pytest-asyncio==0.24.0 pytest-cov==6.0.0 pytest-icdiff==0.9 -ruff==0.7.4 +ruff==0.8.0 setuptools==75.6.0 tox==4.23.2 tox-gh-actions==3.2.0 diff --git a/test/conftest.py b/test/conftest.py index f8ddccb3a..391a5553c 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -14,7 +14,7 @@ class EventLoopClockAdvancer: # thanks to @dermotduffy for his asyncio.sleep mock # https://github.com/dermotduffy/hyperion-py/blob/main/tests/client_test.py#L273 - __slots__ = ("offset", "loop", "_base_time") + __slots__ = ("_base_time", "loop", "offset") def __init__(self, loop: asyncio.AbstractEventLoop) -> None: """Initialize.""" diff --git a/xknx/devices/__init__.py b/xknx/devices/__init__.py index 10cd2cd9b..5fe425b88 100644 --- a/xknx/devices/__init__.py +++ b/xknx/devices/__init__.py @@ -24,9 +24,8 @@ "Climate", "ClimateMode", "Cover", - "DateTimeDevice", "DateDevice", - "TimeDevice", + "DateTimeDevice", "Device", "Devices", "ExposeSensor", @@ -38,6 +37,7 @@ "Scene", "Sensor", "Switch", + "TimeDevice", "TravelCalculator", "TravelStatus", "Weather", diff --git a/xknx/devices/travelcalculator.py b/xknx/devices/travelcalculator.py index 764873380..55f03e63f 100644 --- a/xknx/devices/travelcalculator.py +++ b/xknx/devices/travelcalculator.py @@ -28,15 +28,15 @@ class TravelCalculator: """Class for calculating the current position of a cover.""" __slots__ = ( - "travel_direction", - "travel_time_down", - "travel_time_up", "_last_known_position", "_last_known_position_timestamp", "_position_confirmed", "_travel_to_position", "position_closed", "position_open", + "travel_direction", + "travel_time_down", + "travel_time_up", ) def __init__(self, travel_time_down: float, travel_time_up: float) -> None: diff --git a/xknx/exceptions/__init__.py b/xknx/exceptions/__init__.py index ef005f5b8..a82abea4b 100644 --- a/xknx/exceptions/__init__.py +++ b/xknx/exceptions/__init__.py @@ -32,13 +32,13 @@ "CouldNotParseTelegram", "DataSecureError", "DeviceIllegalValue", - "ManagementConnectionError", - "ManagementConnectionRefused", - "ManagementConnectionTimeout", + "IPSecureError", "IncompleteKNXIPFrame", "InvalidSecureConfiguration", "KNXSecureValidationError", - "IPSecureError", + "ManagementConnectionError", + "ManagementConnectionRefused", + "ManagementConnectionTimeout", "TunnellingAckError", "UnsupportedCEMIMessage", "XKNXException", diff --git a/xknx/io/__init__.py b/xknx/io/__init__.py index 499e8e8df..91cbdafcb 100644 --- a/xknx/io/__init__.py +++ b/xknx/io/__init__.py @@ -16,18 +16,18 @@ from .tunnel import TCPTunnel, UDPTunnel __all__ = [ - "knx_interface_factory", "DEFAULT_MCAST_GRP", "DEFAULT_MCAST_PORT", + "ConnectionConfig", + "ConnectionType", "DescriptionQuery", - "GatewayScanFilter", "GatewayDescriptor", + "GatewayScanFilter", "GatewayScanner", - "ConnectionConfig", - "SecureConfig", - "ConnectionType", "KNXIPInterface", "Routing", + "SecureConfig", "TCPTunnel", "UDPTunnel", + "knx_interface_factory", ] diff --git a/xknx/knxip/__init__.py b/xknx/knxip/__init__.py index 99740d80d..cb6460898 100644 --- a/xknx/knxip/__init__.py +++ b/xknx/knxip/__init__.py @@ -58,34 +58,35 @@ from .tunnelling_request import TunnellingRequest __all__ = [ - "KNXIPBody", - "KNXIPBodyResponse", + "DIB", + "HPAI", + "SRP", "ConnectRequest", "ConnectRequestInformation", + "ConnectRequestType", "ConnectResponse", "ConnectResponseData", "ConnectionStateRequest", "ConnectionStateResponse", - "DescriptionRequest", - "DescriptionResponse", - "DeviceConfigurationAck", - "DeviceConfigurationRequest", - "DIB", "DIBDeviceInformation", "DIBGeneric", "DIBSecuredServiceFamilies", + "DIBServiceFamily", "DIBSuppSVCFamilies", "DIBTunnelingInfo", + "DIBTypeCode", + "DescriptionRequest", + "DescriptionResponse", + "DeviceConfigurationAck", + "DeviceConfigurationRequest", "DisconnectRequest", "DisconnectResponse", "ErrorCode", - "KNXIPHeader", - "HPAI", - "KNXIPFrame", - "ConnectRequestType", - "DIBServiceFamily", - "DIBTypeCode", "HostProtocol", + "KNXIPBody", + "KNXIPBodyResponse", + "KNXIPFrame", + "KNXIPHeader", "KNXIPServiceType", "KNXMedium", "RoutingBusy", @@ -101,7 +102,6 @@ "SessionRequest", "SessionResponse", "SessionStatus", - "SRP", "TimerNotify", "TunnellingAck", "TunnellingFeatureGet", diff --git a/xknx/remote_value/__init__.py b/xknx/remote_value/__init__.py index 1f3e91c38..009211f2a 100644 --- a/xknx/remote_value/__init__.py +++ b/xknx/remote_value/__init__.py @@ -35,9 +35,8 @@ "RemoteValueColorRGBW", "RemoteValueColorXYY", "RemoteValueControllerMode", - "RemoteValueDateTime", "RemoteValueDate", - "RemoteValueTime", + "RemoteValueDateTime", "RemoteValueDptValue1Ucount", "RemoteValueNumeric", "RemoteValueOperationMode", @@ -50,5 +49,6 @@ "RemoteValueString", "RemoteValueSwitch", "RemoteValueTemp", + "RemoteValueTime", "RemoteValueUpDown", ] diff --git a/xknx/secure/__init__.py b/xknx/secure/__init__.py index 609cbb974..f99809730 100644 --- a/xknx/secure/__init__.py +++ b/xknx/secure/__init__.py @@ -5,7 +5,7 @@ __all__ = [ "Keyring", - "load_keyring", "bytes_xor", + "load_keyring", "sha256_hash", ] diff --git a/xknx/secure/data_secure_asdu.py b/xknx/secure/data_secure_asdu.py index 303d0e63b..9a61b5ab9 100644 --- a/xknx/secure/data_secure_asdu.py +++ b/xknx/secure/data_secure_asdu.py @@ -70,7 +70,7 @@ class SecurityALService(IntEnum): class SecurityControlField: """Class for KNX Data Secure Security Control Field (SCF).""" - __slots__ = ("tool_access", "algorithm", "system_broadcast", "service") + __slots__ = ("algorithm", "service", "system_broadcast", "tool_access") def __init__( self, @@ -122,7 +122,7 @@ def __str__(self) -> str: class SecureData: """Class for KNX Data Secure ASDU for S-A_Data-service.""" - __slots__ = ("sequence_number_bytes", "secured_apdu", "message_authentication_code") + __slots__ = ("message_authentication_code", "secured_apdu", "sequence_number_bytes") def __init__( self, diff --git a/xknx/telegram/__init__.py b/xknx/telegram/__init__.py index d70db9218..8a5f89e18 100644 --- a/xknx/telegram/__init__.py +++ b/xknx/telegram/__init__.py @@ -17,6 +17,6 @@ "GroupAddressType", "IndividualAddress", "Telegram", - "TelegramDirection", "TelegramDecodedData", + "TelegramDirection", ]