-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-overloads
Description
The revealed type for the os.path.join call in the program below is unicode, even though I'd expect either Any or str, as the arguments have types Any and str:
import os
def f(): pass
reveal_type(os.path.join(f(), 'x')) # builtins.unicodeHere's a self-contained example:
# a.pyi
from typing import overload
@overload
def join(__p1: bytes, *p: bytes) -> bytes: ...
@overload
def join(__p1: unicode, *p: unicode) -> unicode: ...# program.py
from a import join
def f(): pass
reveal_type(join(f(), 'x')) # builtins.unicodeRun as mypy -2 program.py.
@Michael0x2a Do you have time to have a look at this? This is causing issues in internal Dropbox repos. If you are busy, I can try to fix this. This was apparently introduced by f61c2ba.
Metadata
Metadata
Assignees
Labels
bugmypy got something wrongmypy got something wrongfalse-positivemypy gave an error on correct codemypy gave an error on correct codepriority-0-hightopic-overloads