libgpiod icon indicating copy to clipboard operation
libgpiod copied to clipboard

Python for LineSettings has invalid __repr__

Open Robtom5 opened this issue 1 year ago • 2 comments

The code for repr of LineSettings is missing commas to separate the arguments

Current LineSettings(direction={}, edge_detection={} bias={} drive={} active_low={} debounce_period={} event_clock={} output_value={})

Correct: LineSettings(direction={}, edge_detection={}, bias={}, drive={}, active_low={}, debounce_period={}, event_clock={}, output_value={})

A suitable test would be


test_settings = LineSettings(....)
assert test_settings == eval(test_settings.__repr__())

Robtom5 avatar Jan 30 '24 14:01 Robtom5

Thanks for the report, I'll fix it. Can I have your email address for the Reported-by tag?

brgl avatar Jan 30 '24 14:01 brgl

[email protected]

Robtom5 avatar Feb 02 '24 11:02 Robtom5

Fix is now in master.

brgl avatar Feb 23 '24 14:02 brgl