Skip to content

Introduce _typeshed.GenericPath and _typeshed.AnyStr_co - #7970

Merged
AlexWaygood merged 2 commits into
python:masterfrom
AlexWaygood:genericpath
May 27, 2022
Merged

AlexWaygood merged 2 commits into
python:masterfrom
AlexWaygood:genericpath

Conversation

@AlexWaygood

Copy link
Copy Markdown
Member

No description provided.

@github-actions

This comment has been minimized.

Comment thread stdlib/_typeshed/__init__.pyi Outdated
# These aliases are simple strings in Python 2.
StrPath: TypeAlias = str | PathLike[str] # stable
BytesPath: TypeAlias = bytes | PathLike[bytes] # stable
GenericPath: TypeAlias = AnyStr | PathLike[AnyStr]

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.

Good name!

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
@github-actions

Copy link
Copy Markdown
Contributor

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

@AlexWaygood
AlexWaygood merged commit ceccc65 into python:master May 27, 2022
@AlexWaygood
AlexWaygood deleted the genericpath branch May 27, 2022 18:02
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