tych0 / xcffib

A drop-in replacement for xpyb based on cffi
Apache License 2.0
93 stars 26 forks source link

don't assign pack pop result to anything #146

Closed tych0 closed 1 year ago

tych0 commented 1 year ago

c94ea3e76b4a ("don't generate invalid syntax on padding unpack") caused some weird things to happen, e.g.:

struct.pack("3x", _)

instead, let's just not assign the result of popping padding to anything, which was the source of the original syntax error.

This commit also adds a (failing) flake8 line to check the generated code. This line reveals other bugs, so we have to leave it fail for now. But these bugs have all been in xcffib for a long time, so it's probably ok :)

Signed-off-by: Tycho Andersen tycho@tycho.pizza