Skip to content

Issue with urlencode typeshed annotation starting in mypy 0.780 #4234

Closed
@nipunn1313

Description

@nipunn1313

https://mypy-play.net/?mypy=0.780&python=3.8&gist=67acdcb73a9d1fef5db0780b9a51d9c9

Short repro

from urllib.parse import urlencode, quote

args_dict = {'a': 'b'}
urlencode(args_dict, quote_via=quote)

Passes on 0.770 fails on 0.780

main.py:4: error: Value of type variable "AnyStr" of "urlencode" cannot be "Union[bytes, str]"
Found 1 error in 1 file (checked 1 source file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions