Skip to content

Commit fdf4f04

Browse files
committed
update ruff
1 parent dfe119b commit fdf4f04

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

can/broadcastmanager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ class _Pywin32Event:
3939

4040
class _Pywin32:
4141
def __init__(self) -> None:
42-
import pywintypes # pylint: disable=import-outside-toplevel,import-error
43-
import win32event # pylint: disable=import-outside-toplevel,import-error
42+
import pywintypes # noqa: PLC0415 # pylint: disable=import-outside-toplevel,import-error
43+
import win32event # noqa: PLC0415 # pylint: disable=import-outside-toplevel,import-error
4444

4545
self.pywintypes = pywintypes
4646
self.win32event = win32event

can/interfaces/systec/structures.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ class CanMsg(Structure):
5151
DWORD,
5252
), # Receive time stamp in ms (for transmit messages no meaning)
5353
]
54+
__hash__ = Structure.__hash__
5455

5556
def __init__(
5657
self, id_=0, frame_format=MsgFrameFormat.MSG_FF_STD, data=None, dlc=None
@@ -116,6 +117,7 @@ class Status(Structure):
116117
("m_wCanStatus", WORD), # CAN error status (see enum :class:`CanStatus`)
117118
("m_wUsbStatus", WORD), # USB error status (see enum :class:`UsbStatus`)
118119
]
120+
__hash__ = Structure.__hash__
119121

120122
def __eq__(self, other):
121123
if not isinstance(other, Status):
@@ -171,6 +173,7 @@ class InitCanParam(Structure):
171173
WORD,
172174
), # number of transmit buffer entries (default is 4096)
173175
]
176+
__hash__ = Structure.__hash__
174177

175178
def __init__(
176179
self, mode, BTR, OCR, AMR, ACR, baudrate, rx_buffer_entries, tx_buffer_entries
@@ -277,6 +280,7 @@ class HardwareInfoEx(Structure):
277280
("m_dwUniqueId3", DWORD),
278281
("m_dwFlags", DWORD), # additional flags
279282
]
283+
__hash__ = Structure.__hash__
280284

281285
def __init__(self):
282286
super().__init__(sizeof(HardwareInfoEx))
@@ -389,6 +393,7 @@ class ChannelInfo(Structure):
389393
WORD,
390394
), # CAN status (same as received by method :meth:`UcanServer.get_status`)
391395
]
396+
__hash__ = Structure.__hash__
392397

393398
def __init__(self):
394399
super().__init__(sizeof(ChannelInfo))

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ docs = [
8888
]
8989
lint = [
9090
"pylint==3.3.*",
91-
"ruff==0.11.12",
91+
"ruff==0.12.5",
9292
"black==25.1.*",
9393
"mypy==1.17.*",
9494
]

0 commit comments

Comments
 (0)