close
Skip to content

meta: add SimplePath protocol for PathDistribution#315

Merged
jaraco merged 5 commits into
python:mainfrom
FFY00:pathdistribution-type-hint
May 26, 2021
Merged

meta: add SimplePath protocol for PathDistribution#315
jaraco merged 5 commits into
python:mainfrom
FFY00:pathdistribution-type-hint

Conversation

@FFY00

@FFY00 FFY00 commented May 24, 2021

Copy link
Copy Markdown
Member

This is needed to properly annotate code that uses PathDistribution,
otherwise I need to keep redefining the protocol in my code.

Signed-off-by: Filipe Laíns lains@riseup.net

@FFY00 FFY00 force-pushed the pathdistribution-type-hint branch from 5f23a8a to d0616a8 Compare May 24, 2021 14:57
This is needed to properly annotate code that uses PathDistribution,
otherwise I need to keep redefining the protocol in my code.

Signed-off-by: Filipe Laíns <lains@riseup.net>
@FFY00 FFY00 force-pushed the pathdistribution-type-hint branch from d0616a8 to fa20a0a Compare May 24, 2021 15:02
@jaraco jaraco changed the title meta: add Path protocol for PathDistribution meta: add SimplePath protocol for PathDistribution May 26, 2021
@FFY00

FFY00 commented May 26, 2021

Copy link
Copy Markdown
Member Author

Please ping me when this goes to CPython, so that I can send a PR to typeshed.

@jaraco

jaraco commented May 26, 2021

Copy link
Copy Markdown
Member

I don't understand the diffcov failure. It says:

importlib_metadata/__init__.py (0.0%): Missing lines 26,786

It indicates that line 26 is not covered and line 786 is not covered.

But those lines should be executed on import.

@jaraco jaraco merged commit 5a4699d into python:main May 26, 2021
@jaraco

jaraco commented May 26, 2021

Copy link
Copy Markdown
Member

I just ignored the spurious diffcov failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants