Skip to content
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

Replace PathLike unions with aliases from _typeshed #5467

Merged
merged 5 commits into from
May 16, 2021

Conversation

srittau
Copy link
Collaborator

@srittau srittau commented May 16, 2021

Standardize on 'from os import PathLike'

Marking as draft as this builds on #5466.

@srittau srittau marked this pull request as ready for review May 16, 2021 14:27
@@ -66,7 +66,7 @@ def complete_statement(sql: str) -> bool: ...

if sys.version_info >= (3, 7):
def connect(
database: Union[bytes, str, os.PathLike[str]],
database: AnyPath,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked.

@@ -271,7 +271,7 @@ class HTTPErrorProcessor(BaseHandler):

def urlretrieve(
url: str,
filename: Optional[Union[str, os.PathLike[Any]]] = ...,
filename: Optional[AnyPath] = ...,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked as well. Works with bytes.

@srittau
Copy link
Collaborator Author

srittau commented May 16, 2021

Primer is clean.

@srittau srittau merged commit e5abd08 into python:master May 16, 2021
@srittau srittau deleted the use-typeshed branch May 16, 2021 19:38
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