Skip to content

Commit

Permalink
refactor(logitech_receiver/hidpp20_constants.py): replace ERROR Named…
Browse files Browse the repository at this point in the history
…Int by IntEnum. (fix problem with | operator when typing with python 3.8)
  • Loading branch information
rloutrel committed Oct 26, 2024
1 parent a1fb813 commit 14bc122
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/logitech_receiver/test_base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import struct
import sys

from typing import Union
from unittest import mock

import pytest
Expand Down Expand Up @@ -131,7 +132,9 @@ def test_get_next_sw_id():
(b"\xff", Hidpp20Error.unknown, False, True),
],
)
def test_request_errors(prefix: bytes, error_code: Hidpp10Error | Hidpp20Error, return_error: bool, raise_exception: bool):
def test_request_errors(
prefix: bytes, error_code: Union[Hidpp10Error, Hidpp20Error], return_error: bool, raise_exception: bool
):
handle = 0
device_number = 66

Expand Down

0 comments on commit 14bc122

Please sign in to comment.