These return Const(""), which is really misleading (even an Uninferable is better):
code = """
s = str("abc") #@
s = str(1) #@
s = str(None) #@
s = str(2 + 2) #@
"""
Looking at brain_builtin_inference.py, the def infer_str() function is hardcoded to always return Const("").
Next to it is the def infer_int(), which at least tries to examine int() arguments.
I'll submit a small PR fixing it at least for const argument.
These return
Const(""), which is really misleading (even anUninferableis better):Looking at
brain_builtin_inference.py, thedef infer_str()function is hardcoded to always returnConst("").Next to it is the
def infer_int(), which at least tries to examineint()arguments.I'll submit a small PR fixing it at least for const argument.