From 211120629d4588f75bc1ee02389433eb3b379750 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:06:45 +0200 Subject: [PATCH 1/5] update test dependencies --- pyproject.toml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 47d8e7a6d..3af8a6776 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,16 +90,16 @@ lint = [ "pylint==3.3.*", "ruff==0.11.12", "black==25.1.*", - "mypy==1.16.*", + "mypy==1.17.*", ] test = [ - "pytest==8.3.*", - "pytest-timeout==2.1.*", - "coveralls==3.3.1", - "pytest-cov==4.0.0", - "coverage==6.5.0", - "hypothesis~=6.35.0", - "parameterized~=0.8", + "pytest==8.4.*", + "pytest-timeout==2.4.*", + "coveralls==4.0.*", + "pytest-cov==6.2.*", + "coverage==7.10.*", + "hypothesis==6.136.*", + "parameterized==0.9.*", ] dev = [ {include-group = "docs"}, From dfe119b2cc8970899426ce96c2e5e6b4eb016743 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:12:53 +0200 Subject: [PATCH 2/5] use pytest-modern for prettier pytest output --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 3af8a6776..4da1f839b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -95,6 +95,7 @@ lint = [ test = [ "pytest==8.4.*", "pytest-timeout==2.4.*", + "pytest-modern==0.7.*;platform_system!='Windows'", "coveralls==4.0.*", "pytest-cov==6.2.*", "coverage==7.10.*", From fdf4f04bf7e8ab96d072290be668d43efdb375a1 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:29:50 +0200 Subject: [PATCH 3/5] update ruff --- can/broadcastmanager.py | 4 ++-- can/interfaces/systec/structures.py | 5 +++++ pyproject.toml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/can/broadcastmanager.py b/can/broadcastmanager.py index b2bc28e76..a71f6fd11 100644 --- a/can/broadcastmanager.py +++ b/can/broadcastmanager.py @@ -39,8 +39,8 @@ class _Pywin32Event: class _Pywin32: def __init__(self) -> None: - import pywintypes # pylint: disable=import-outside-toplevel,import-error - import win32event # pylint: disable=import-outside-toplevel,import-error + import pywintypes # noqa: PLC0415 # pylint: disable=import-outside-toplevel,import-error + import win32event # noqa: PLC0415 # pylint: disable=import-outside-toplevel,import-error self.pywintypes = pywintypes self.win32event = win32event diff --git a/can/interfaces/systec/structures.py b/can/interfaces/systec/structures.py index c80f21d44..a50ac4c26 100644 --- a/can/interfaces/systec/structures.py +++ b/can/interfaces/systec/structures.py @@ -51,6 +51,7 @@ class CanMsg(Structure): DWORD, ), # Receive time stamp in ms (for transmit messages no meaning) ] + __hash__ = Structure.__hash__ def __init__( self, id_=0, frame_format=MsgFrameFormat.MSG_FF_STD, data=None, dlc=None @@ -116,6 +117,7 @@ class Status(Structure): ("m_wCanStatus", WORD), # CAN error status (see enum :class:`CanStatus`) ("m_wUsbStatus", WORD), # USB error status (see enum :class:`UsbStatus`) ] + __hash__ = Structure.__hash__ def __eq__(self, other): if not isinstance(other, Status): @@ -171,6 +173,7 @@ class InitCanParam(Structure): WORD, ), # number of transmit buffer entries (default is 4096) ] + __hash__ = Structure.__hash__ def __init__( self, mode, BTR, OCR, AMR, ACR, baudrate, rx_buffer_entries, tx_buffer_entries @@ -277,6 +280,7 @@ class HardwareInfoEx(Structure): ("m_dwUniqueId3", DWORD), ("m_dwFlags", DWORD), # additional flags ] + __hash__ = Structure.__hash__ def __init__(self): super().__init__(sizeof(HardwareInfoEx)) @@ -389,6 +393,7 @@ class ChannelInfo(Structure): WORD, ), # CAN status (same as received by method :meth:`UcanServer.get_status`) ] + __hash__ = Structure.__hash__ def __init__(self): super().__init__(sizeof(ChannelInfo)) diff --git a/pyproject.toml b/pyproject.toml index 4da1f839b..51bcff693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ docs = [ ] lint = [ "pylint==3.3.*", - "ruff==0.11.12", + "ruff==0.12.5", "black==25.1.*", "mypy==1.17.*", ] From e3d16c4c9cbb3cb037f45346d40cf837f88bfa17 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:58:51 +0200 Subject: [PATCH 4/5] fix coveralls flag-name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c3bb407f..3d805a601 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,7 +51,7 @@ jobs: uses: coverallsapp/github-action@v2 with: github-token: ${{ secrets.github_token }} - flag-name: Unittests-${{ matrix.os }}-${{ matrix.python-version }} + flag-name: Unittests-${{ matrix.os }}-${{ matrix.env }} parallel: true path-to-lcov: ./coverage.lcov From a0f61465730c3bd279ff3c2b7995444e17af86e9 Mon Sep 17 00:00:00 2001 From: zariiii9003 <52598363+zariiii9003@users.noreply.github.com> Date: Sun, 27 Jul 2025 15:11:11 +0200 Subject: [PATCH 5/5] checkout to fix failing "git log" cmd --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d805a601..b799b463e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,6 +59,7 @@ jobs: needs: test runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Coveralls Finished uses: coverallsapp/github-action@v2 with: