Skip to content

Adjust MetaPathFinder - #6344

Merged
Akuli merged 4 commits into
python:masterfrom
layday:adjust-meta-path
Nov 20, 2021
Merged

Akuli merged 4 commits into
python:masterfrom
layday:adjust-meta-path

Conversation

@layday

@layday layday commented Nov 19, 2021

Copy link
Copy Markdown
Contributor

Deprecated since 3.4 and triggers spurious errors in type checkers
when implementing a meta path finder without it.
@Akuli

Akuli commented Nov 19, 2021

Copy link
Copy Markdown
Collaborator

You need to git pull https://github.com/python/typeshed to fix the CI error.

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.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

Comment thread stdlib/sys.pyi Outdated
Comment thread stdlib/sys.pyi Outdated
@github-actions

This comment has been minimized.

Comment thread stdlib/sys.pyi Outdated
_ExcInfo = Tuple[Type[BaseException], BaseException, TracebackType]
_OptExcInfo = Union[_ExcInfo, Tuple[None, None, None]]
_PathSequence = Sequence[Union[bytes, str]]
_ModulePath = Sequence[str]

Copy link
Copy Markdown
Collaborator

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.

@Akuli

Akuli commented Nov 19, 2021

Copy link
Copy Markdown
Collaborator

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.

@layday

layday commented Nov 19, 2021

Copy link
Copy Markdown
Contributor Author

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.

@github-actions

This comment has been minimized.

Comment thread stdlib/sys.pyi Outdated
@github-actions

Copy link
Copy Markdown
Contributor

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

@Akuli
Akuli merged commit b2b7ceb into python:master Nov 20, 2021
@layday

layday commented Nov 20, 2021

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @Akuli.

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.

4 participants