Files
openide/python/testData/inspections/PyStringFormatInspection/NewStyleMappingKeyWithSubscriptionFuncDictArg.py
Valentina Kiryushkina 1dfb4dcdee PY-21164 PY-8325 Fix false positives for packed collections inside collections in python 3.5
* Move indexed elements resolve from inspection to PySubstitutionChunkReference
* Resolve correctly to packed list/tuple inside list/tuple, to packed dict inside dict
* Update tests
2017-05-15 14:37:55 +03:00

12 lines
311 B
Python

def d():
return {"a": 1}
"{foo[a]}".format(foo=d())
<warning descr="Too few arguments for format string">"{foo[b]}"</warning>.format(foo=d())
def d_dict():
return dict(a=1)
"{foo[a]}".format(foo=d_dict())
<warning descr="Too few arguments for format string">"{foo[b]}"</warning>.format(foo=d_dict())