Tuple[AnyStr] always get converted into Tuple[unicode] in Py2 #6761
Labels
needs discussion
priority-2-low
topic-python2
issues only applicable to Python 2
topic-type-variables
topic-union-types
Are you reporting a bug, or opening a feature request?
A bug.
Please insert below the code you are checking with mypy,
or a mock-up repro if the source is private. We would appreciate
if you try to simplify your case to a minimal repro.
Do you see the same issue after installing mypy from Git master?
Python 3.7.3, mypy 0.701
Yes (as of b29a433)
--py2
. Note I get the expected output with bothstr
andbytes
without--py2
.To be slightly more concrete, this came about trying to figure out what was going on with code calling
os.path.split
(which is(AnyStr) -> Tuple[AnyStr, AnyStr]
), and not getting the results I was expecting.The text was updated successfully, but these errors were encountered: