gvalkov / python-evdev

Python bindings for the Linux input subsystem
https://python-evdev.rtfd.org/
BSD 3-Clause "New" or "Revised" License
334 stars 112 forks source link

Implement type stubs for ecodes #216

Open Lillecarl opened 7 months ago

Lillecarl commented 7 months ago

Helps your $EDITOR find the constants from ecodes.c, making for a more pleasant developer experience.

I've got a "grand plan" to extend evdevremapkeys to support importing your own Python modules, and when building those modules it would be very nice to get autocomplete and type checking for ecodes.KEY_A and such.

I'm relatively new to Python and haven't messed with setuptools before at all, I've hacked together the install class to copy the pyi file with the wheel but I'm eager to know of a better way (MANIFEST.in doesn't seem to work because the file doesn't exist when setuptools starts).

sezanzeb commented 6 months ago

Hey, sorry I haven't spent time on this yet. I hope I'll manage to look into this soon.

Lillecarl commented 3 months ago

@sezanzeb Don't worry, I've been on the lazy side "projectifying" and my thing as well. I could've refined this further during this time.

I'll get back to you 😁