Warnings found by automatic code inspection and partially tackled - Drop distuitls inf favour of setuptools - Replace deprecated pyudev.Device.from_device_number - Remove unnecessary brackets - Avoid access to private variables etc. - Shadows built-in name - Line length >120 characters - Not a module level variable - Simplify clause and more
21 lines
397 B
Python
21 lines
397 B
Python
from __future__ import annotations
|
|
|
|
import dataclasses
|
|
|
|
|
|
@dataclasses.dataclass
|
|
class DeviceInfo:
|
|
path: str
|
|
bus_id: str | None
|
|
vendor_id: str
|
|
product_id: str
|
|
interface: str | None
|
|
driver: str | None
|
|
manufacturer: str | None
|
|
product: str | None
|
|
serial: str | None
|
|
release: str | None
|
|
isDevice: bool
|
|
hidpp_short: str | None
|
|
hidpp_long: str | None
|