Files
openide/python/testData/paramInfo/InitializingCollectionsNamedTuple.py
Semyon Proshev 07fb8fca0a PY-4344 Fixed: Parameter unfilled: false negatives for named tuples
PY-22102 Fixed: NamedTuple class declaration for Python 3.6 not supported by PyCharm
PY-22249 Fixed: Add parameters tooltip to namedtuple constructor
PY-22740 Fixed: Unexpected argument for field names of class inherited from namedtuple

Update PyNamedTupleType to be callable and provide parameters when creating new namedtuple instance.
Update PyStdlibTypeProvider to provide special callable types when creating new namedtuple inheritor instance.
Update PyCallExpressionHelper to check type providers when resolving callee.
Update PyClassImpl to return PyNamedTupleType when class inherits typing.NamedTuple.

Parameter hints and PyArgumentListInspection work correctly with creating new namedtuple instances.
2017-06-09 21:29:11 +03:00

12 lines
167 B
Python

from collections import namedtuple
MyTup1 = namedtuple("MyTup1", "bar baz")
class MyTup2(namedtuple("MyTup2", "bar baz")):
pass
MyTup1(<arg1>)
MyTup2(<arg2>)