Files
Solaar/lib/hidapi/common.py
Matthias Hagmann 7d171b1d09 Refactor: Use dataclasses and enums
Replace NamedTuples with more flexible dataclass, which also support
type hints. Introduce enums to replace constant strings, which need to
be kept in sync. Also enhances interfaces by limiting it to the enum
values. Remove unused variables.
2024-05-22 21:14:41 -04:00

19 lines
298 B
Python

import dataclasses
@dataclasses.dataclass
class DeviceInfo:
path: str
bus_id: str
vendor_id: str
product_id: str
interface: str
driver: str
manufacturer: str
product: str
serial: str
release: str
isDevice: bool
hidpp_short: str
hidpp_long: str