| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
FYI, @RonnyPfannschmidt was also considering tackling this effort (discussion in #importlib-metadata channel on PyPA discord). |
Sorry, something went wrong.
|
Cool. I'm mostly just aiming for the low-hanging fruit here and perhaps testing the waters for receptiveness to further work. The pipeline and I both are currently happy; I reckon I'm done fiddling with this one now. |
Sorry, something went wrong.
|
I have not yet started own work, great to see this start |
Sorry, something went wrong.
There was a problem hiding this comment.
This looks good and nearly ready to merge. Just a few concerns to address.
Sorry, something went wrong.
|
OK, I've pushed change that - I hope - err in the direction of avoiding and deferring any difficult questions
|
Sorry, something went wrong.
Yes. Distribution is the right choice here. Thanks. |
Sorry, something went wrong.
the code that you have merged still used PathDistribution: importlib_metadata/importlib_metadata/__init__.py Lines 796 to 798 in 705a757 |
Sorry, something went wrong.
Aah. I was looking at the wrong thing (because it wasn't in the diff). I think PathDistribution is okay here because it's a specific implementation that does specifically only return PathDistribution (even though other DistributionFinders might return a more generic Distribution). Thanks for flagging it. |
Sorry, something went wrong.
|
I realized that the declaration of Distribution.locate_file is incorrect and have started work to correct it in #480. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
It's kind of annoying that this library publishes a py.typed, but most of the API is not type-annotated. Users who check their own code with mypy are obliged to scatter around # type: ignore[no-untyped-call] comments.
Possible points of interest:
This MR doesn't annotate the whole API: I've ducked the slightly difficult ones like distributions(), select() and matches(). typeshed has annotations that are presumably satisfactory in practice, but it looks as though applying them here would be more invasive than I intend to be in this commit. https://github.com/python/typeshed/blob/main/stdlib/importlib/metadata/__init__.pyi
This MR is a long way from annotating the whole project - mypy --strict importlib_metadata reports 171 errors, so it would take a bit more of a campaign to work through that.