python / importlib_metadata

Library to access metadata for Python packages
https://importlib-metadata.readthedocs.io
Apache License 2.0
122 stars 79 forks source link

Fix type annotation in `SimplePath.__truediv__` #469

Closed sobolevn closed 7 months ago

sobolevn commented 10 months ago

Closes https://github.com/python/importlib_metadata/issues/468

dimbleby commented 9 months ago

shouldn't joinpath agree with __truediv__?

AlexWaygood commented 7 months ago

FWIW, I think I might have misspoken in https://github.com/python/typeshed/pull/10665#discussion_r1317064707 -- this annotation doesn't look as bad as I thought when I gave my analysis there (which is what prompted Nikita to create this PR). _T should always be solvable for this method, since the whole protocol is generic around the TypeVar, rather than the TypeVar being locally bound to just this method

jaraco commented 7 months ago

Based on the discussion, my understanding is that the status quo is probably acceptable and thus we'll choose to reject this change (and its unresolved concerns). Thanks anyhow for the proposal. If you wish to revisit the concern, let's be sure to answer the open concerns about correctness and consistency.