mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
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.
12 lines
167 B
Python
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>) |