-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adjust MetaPathFinder
#6344
Adjust MetaPathFinder
#6344
Conversation
Deprecated since 3.4 and triggers spurious errors in type checkers when implementing a meta path finder without it.
You need to Edit: I don't think this is true. I'll figure out what's going on. Edit 2: We can ignore the pre-commit CI error. It will be fixed once #6341 is merged. |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
stdlib/sys.pyi
Outdated
@@ -27,12 +27,11 @@ _T = TypeVar("_T") | |||
# The following type alias are stub-only and do not exist during runtime | |||
_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType] | |||
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]] | |||
_PathSequence = Sequence[Union[bytes, str]] | |||
_ModulePath = Sequence[str] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This type alias is no longer needed, because it is used only once. Just use Sequence[str]
directly.
Another nit: It is better to not amend/rebase. Force-pushing makes reviewing the code more difficult, because reviewers can't just click the latest commit to see what changed since the previous review. We use GitHub's "Squash and merge" button, so the whole PR will appear as a single commit in Git history anyway. |
I agree and I usually avoid doing that. I'm not sure why I did it here - probably because I was editing the tip and it seemed fairly minor that it didn't warrant pushing a fixup which I'd then have to rebase/squash. I wasn't aware that you squash everything anyway. |
This comment has been minimized.
This comment has been minimized.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Thanks for the review, @Akuli. |
Going off the documentation at https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder.find_spec.