Skip to content

ADD: types for ExtensionFileLoader (#4769) #6120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2021

Conversation

hardikpnsp
Copy link
Contributor

Issues #4769

Changes

Notes

  • In return type of create_module, I have added None because I think in create_module the internal _imp.create_dynamic can return NULL but I am not completely sure about it.

@github-actions

This comment has been minimized.

@JelleZijlstra
Copy link
Member

Returning NULL in C means throwing an exception, not returning None (you'd see Py_RETURN_NONE for that).

Also, thanks for your PR!

@hardikpnsp
Copy link
Contributor Author

Returning NULL in C means throwing an exception, not returning None (you'd see Py_RETURN_NONE for that).

I see! Thanks for your feedback. I don't see Py_RETURN_NONE macro anywhere in that function. I will remove None in a subsequent commit.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2021

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks!

@srittau srittau merged commit ee31999 into python:master Oct 8, 2021
@hardikpnsp hardikpnsp deleted the add-missing-importlib-types branch October 9, 2021 14:37
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.

3 participants