Relax parameter type to call_input_event()
https://gitlab.freedesktop.org/libevdev/hid-tools/-/blob/master/hidtools/uhid.py#L257
Can you change this annotation to Iterable[int]
in order to be more flexible? I call this method with bytearray(b'\x02\x80')
, which works just fine at runtime.
If you wanted to be fully flexible, you could copy the full set of allowed types for bytes():
https://github.com/python/typeshed/blob/d8c174d26aaacd3d72481c4d142f569f242ec4f8/stdlib/builtins.pyi#L625
But, in general, you should use generic types (Iterable, Sequence, Mapping etc.) for parameters, and concrete types (list, dict etc.) for return types. This will provide users with the most flexibility.