Repository navigation
feat: ship py.typed and pass mypy --strict - #3
Conversation
6dd7d32 to
9603c12
Compare
not sure it is needed....
|
@davidski : nice improvment, thanks |
|
so I shall make the v0.1.4 on this basis so you can bump in homeassistant (just a bump commit so they can accept quickly). Right for yu ? |
|
Thanks so much! Hold on for just a moment. I'm tracking down a possible glitch with the type conversions. |
|
I've merged but no problem for another PR |
|
@alexandrecuer Thanks for merging! An apology and a heads-up: When I rebased this branch after #2 merged, I force-pushed over your commit that pulled in The effect: the library no longer configures the root logger on import. Applications that set up logging themselves (Home Assistant does) see no difference. Scripts that never call Happy to go either way: keep it (it's the usual practice for libraries), or I'll send a PR restoring the old behavior. Just let me know. Separately, #4 fixes two typing gaps from this PR: a wrong return type on Sorry for the confusion, and I'll check before force-pushing shared branches in future. |
Let's keep it like you did. It is a better design :-) |
Summary
Makes the package PEP 561 typed so downstream users like Home Assistant can type-check against it. HA's strict-typing rule requires integration libraries to ship
py.typed. My intent is to move the emoncms integration up the quality scale a notch or two.Evidence
main):Merge Danger
Door: two-way
Blast Radius: small
urlnow defaults to""instead ofNone. Every caller passes a URL, so in practice nothing changes.python_requires=">=3.9"is now correct: onmainthe package fails to import on 3.9. 😬