Skip to content

Issue with urlencode typeshed annotation starting in mypy 0.780 #4234

@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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy