Skip to content

Add typing for load and select - #483

Merged
jaraco merged 4 commits into
python:mainfrom
Danyal-Faheem:add-types-for-untyped-methods
Mar 7, 2024
Merged

jaraco merged 4 commits into
python:mainfrom
Danyal-Faheem:add-types-for-untyped-methods

Conversation

@Danyal-Faheem

Copy link
Copy Markdown

Changes

  • Added typing for the Entrypoint.load() and the Entrypoints.select() method.

As the Entrypoint.load() returns more than one type depending on the value of the value variable, it was necessary to set it as Any.

Comment thread importlib_metadata/__init__.py Outdated

@jaraco jaraco left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this change introduces a couple of new errors:

________________________ importlib_metadata/__init__.py ________________________
184: error: Item "None" of "Optional[Match[str]]" has no attribute "group"  [union-attr]
185: error: Item "None" of "Optional[Match[str]]" has no attribute "group"  [union-attr]

@jaraco
jaraco merged commit 26b22b8 into python:main Mar 7, 2024
@Danyal-Faheem
Danyal-Faheem deleted the add-types-for-untyped-methods branch March 7, 2024 06:26
@Avasam Avasam mentioned this pull request Aug 22, 2024
1 of 2 tasks
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