python-evdev icon indicating copy to clipboard operation
python-evdev copied to clipboard

Request: Add typehints

Open pafcu opened this issue 8 years ago • 2 comments

It would be nice to have PEP-484 typehints for all functions and methods to make it easier to write correct code using python-evdev.

pafcu avatar Feb 22 '17 07:02 pafcu

I'd like to continue supporting Python 2 until it is deprecated. I'm not a fan of type declarations in comments or type stub files. Overall, I don't think there's much in the project that a static analysis tool (e.g. jedi) can't figure out. Perhaps in 2020 I'll release a Python 3 only version with type hints :)

gvalkov avatar Aug 27 '18 18:08 gvalkov

Hi, just randomly bumped into this issue by chance. I'm personally a big fan of adding type hints. They make working in most texteditors a lot easier and don't require a heavy setup like with jedi (which sometimes doesn't always work or is compatible).

Your point of supporting python 2.7 is a good one on which I don't really have an opinion on since I basicially ever only used python3 anyway.

If anything this comment might just be a friendly reminder that it is now 2020. :)

LinusCDE avatar Aug 02 '20 05:08 LinusCDE