Skip to content

Fix some importlib usages#2123

Merged
mhammond merged 1 commit intomhammond:mainfrom
Avasam:fix-importlib-usages
Nov 1, 2023
Merged

Fix some importlib usages#2123
mhammond merged 1 commit intomhammond:mainfrom
Avasam:fix-importlib-usages

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Sep 21, 2023

See python/typeshed#10746 (comment) as to why importing directly from importlib shouldn't be relied on for importlib.machinery, importlib.util and importlib.abc.
Mypy & Pyright (see #2102) will also catch the two issues fixed here.

# registry etc.

import importlib
import importlib.machinery
Copy link
Copy Markdown
Collaborator Author

@Avasam Avasam Sep 21, 2023

Choose a reason for hiding this comment

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

See python/typeshed#10746 (comment) as to why importing directly from importlib shouldn't be relied on for importlib.machinery, importlib.util and importlib.abc. Mypy & Pyright (see #2102) will also catch this.

@mhammond mhammond merged commit 4722923 into mhammond:main Nov 1, 2023
@Avasam Avasam deleted the fix-importlib-usages branch November 1, 2023 17:51
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