Add py.typed files #269
Conversation
|
Kudos, SonarCloud Quality Gate passed! |
|
Hello @NiklasRosenstein, thanks a lot for your contribution 👍 We would like to wait for this until we thoroughly type checked fin swimmer |
|
Hey @finswimmer, Don't you think that having some wrong types is better than no types to check against? It also opens up the opportunity for consumers of poetry-core to detect typing issues; see #270 |
Maybe, we should rethink this? It could even help avoiding bugs in poetry. See python-poetry/poetry#5485 (comment) I assume it does more good than evil. |
|
I think on the whole this would be better in than not in
And if there are still mistakes then having a py.typed will encourage putting them right. We could be still further ahead on the typechecking if the MRs that helped to progress this would be merged. python-poetry/poetry#5017 asks for community help, but poetry is slow to accept that help when it arrives. I added a list of open MRs that I know about at python-poetry/poetry#5017 (comment). |
|
I suppose this can be closed because |
I just noticed that myself! This was an accident, I'd been trying the effect of adding this and... well, I guess an empty file is an easy thing to miss in a diff. Anyway, I came here to say that it had gone in accidentally but I reckon that it should stay anyway, happy to see that this was already the thought. |








Fixes python-poetry/poetry#5099
This PR adds a
py.typedfile to mark thepoetry-coresource code as containing type hints.Having poetry-core typed allows Poetry plugins to be more thoroughly type checked with Mypy.