Skip to content

Add _quote and _unquote to http.cookies stub #4914

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

Merged
merged 1 commit into from
Jan 6, 2021

Conversation

UncleGoogle
Copy link
Contributor

Resolves #4895

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks.

@srittau srittau merged commit 8cad322 into python:master Jan 6, 2021
Copy link
Collaborator

@Akuli Akuli left a comment

Choose a reason for hiding this comment

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

If the str variable is None, then these functions return it unchanged, but otherwise these never return None. Maybe we could do something like this to fix that?

Comment on lines +7 to +8
def _quote(str: str) -> str: ...
def _unquote(str: str) -> str: ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def _quote(str: str) -> str: ...
def _unquote(str: str) -> str: ...
@overload
def _quote(str: None) -> None: ...
@overload
def _quote(str: str) -> str: ...
@overload
def _unquote(str: None) -> None: ...
@overload
def _unquote(str: str) -> str: ...

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess I might as well make a new PR to fix this.

@UncleGoogle
Copy link
Contributor Author

Thanks, I didn't noticed.

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.

'http.cookies' has no attribute '_quote'
3 participants