Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump ruff from 0.7.4 to 0.8.0 #1606

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion requirements/testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
4 changes: 2 additions & 2 deletions xknx/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
"Climate",
"ClimateMode",
"Cover",
"DateTimeDevice",
"DateDevice",
"TimeDevice",
"DateTimeDevice",
"Device",
"Devices",
"ExposeSensor",
Expand All @@ -38,6 +37,7 @@
"Scene",
"Sensor",
"Switch",
"TimeDevice",
"TravelCalculator",
"TravelStatus",
"Weather",
Expand Down
6 changes: 3 additions & 3 deletions xknx/devices/travelcalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions xknx/exceptions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
"CouldNotParseTelegram",
"DataSecureError",
"DeviceIllegalValue",
"ManagementConnectionError",
"ManagementConnectionRefused",
"ManagementConnectionTimeout",
"IPSecureError",
"IncompleteKNXIPFrame",
"InvalidSecureConfiguration",
"KNXSecureValidationError",
"IPSecureError",
"ManagementConnectionError",
"ManagementConnectionRefused",
"ManagementConnectionTimeout",
"TunnellingAckError",
"UnsupportedCEMIMessage",
"XKNXException",
Expand Down
10 changes: 5 additions & 5 deletions xknx/io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
28 changes: 14 additions & 14 deletions xknx/knxip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -101,7 +102,6 @@
"SessionRequest",
"SessionResponse",
"SessionStatus",
"SRP",
"TimerNotify",
"TunnellingAck",
"TunnellingFeatureGet",
Expand Down
4 changes: 2 additions & 2 deletions xknx/remote_value/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
"RemoteValueColorRGBW",
"RemoteValueColorXYY",
"RemoteValueControllerMode",
"RemoteValueDateTime",
"RemoteValueDate",
"RemoteValueTime",
"RemoteValueDateTime",
"RemoteValueDptValue1Ucount",
"RemoteValueNumeric",
"RemoteValueOperationMode",
Expand All @@ -50,5 +49,6 @@
"RemoteValueString",
"RemoteValueSwitch",
"RemoteValueTemp",
"RemoteValueTime",
"RemoteValueUpDown",
]
2 changes: 1 addition & 1 deletion xknx/secure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__all__ = [
"Keyring",
"load_keyring",
"bytes_xor",
"load_keyring",
"sha256_hash",
]
4 changes: 2 additions & 2 deletions xknx/secure/data_secure_asdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion xknx/telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"GroupAddressType",
"IndividualAddress",
"Telegram",
"TelegramDirection",
"TelegramDecodedData",
"TelegramDirection",
]