Commit graph

5 commits

Author SHA1 Message Date
Peter Hutterer
76845ecdfe Reformat for ruff 0.9
New formatting rules, apparently.

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/325>
2025-02-03 13:17:34 +10:00
Peter Hutterer
552f6dcbd0 ei-scanner: expose version_arg and version_arg_for
Points to the correspoding "version" argument, or points back to the
argument this version argument is for.
2023-05-26 16:56:13 +10:00
Ian Douglas Scott
1d8cd84c56 ei-scanner: Expose interface_arg, and also provide interface_arg_for
To make this practical to use in a template, we want relations in both
directions. And at least for consistency with other things, these fields
should contain the `Argument` instead of just its name string.

So we need to do this after are the arguments in the message have been
initially parsed. Adding these fields when parsing the request/event
close tag seems to work well enough.

Co-authored-by: Peter Hutterer <peter.hutterer@who-t.net>
2023-05-26 16:55:47 +10:00
Peter Hutterer
00226da59e scanner: add tests for the extra data arguments
Fixed in !218, let's test this so we don't break it again.
2023-05-25 10:09:28 +10:00
Peter Hutterer
ca06927371 test: add some tests for the ei-scanner itself
This is a bit convoluted because ei-scanner is named like that, so it
cannot be imported as python module. The solution for that is to
copy/rename it with meson to the builddir and run pytest in that. This
also allows us to set the path to the protocol XML file while we're at
it so we can use it as a fixture.

Actual tests are minimal for now, can be extended over time.
2023-05-22 10:54:28 +10:00