Closed Avasam closed 2 months ago
@parkouss Could I get a review on this?
@parkouss Bump
Sorry for the (long!) delay! I'm not actively doing support for pyewmh, and for some reason I didn't get any messages from the conversation here (just got your email you sent directly a few days ago). Maybe you'd be interested to take ownership on this project?
@parkouss No worries! I figured that'd be a possibility. Thank you for the offer, but whilst a have quite a bit of experience in Python, and gained much more in its type system over the past 2 years. I don't know that much about EWMH and my wish for PEP 561 support came from usage in https://github.com/Kalmat/PyWinCtl
Lack of tests and experience with EWMH means I could very easily and unknowingly break features. This is not something I could do without someone with the right expertise to help. I also wouldn't want to keep support for EOL versions of Python.
Added type hint comments and
py.typed
marker as per PEP 561 to allow type-checkers to validate usage of EWMH's API. Type comments allow to keep compatibility with python < 3.5. Optionally I could use stub files instead (.pyi
), but that's more likely to fall out of sync with the implementation than inline-typing.Validated with mypy and pyright both in strict mode. Added a github workflow to validate typing.
Also explicitly re-exported
EWMH
. Allow using boolean withsetShowingDesktop
. And prevent potential None errors fromself._getProperty
.(sitenote, just tagging https://github.com/python/typing/issues/566 to link back here)