diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c3bb407f..b799b463e 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 @@ -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: 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 47d8e7a6d..51bcff693 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,18 +88,19 @@ docs = [ ] lint = [ "pylint==3.3.*", - "ruff==0.11.12", + "ruff==0.12.5", "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.*", + "pytest-modern==0.7.*;platform_system!='Windows'", + "coveralls==4.0.*", + "pytest-cov==6.2.*", + "coverage==7.10.*", + "hypothesis==6.136.*", + "parameterized==0.9.*", ] dev = [ {include-group = "docs"},