python / importlib_metadata

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

Fix type annotation in `SimplePath.__truediv__` #469

Closed sobolevn closed 11 months ago

sobolevn commented 1 year ago

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

dimbleby commented 1 year ago

shouldn't joinpath agree with __truediv__?

AlexWaygood commented 1 year 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 11 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.