mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
Full type support for namedtuple._replace (PY-27148)
Provide correct parameters for typed and untyped NT. Clarify return type for untyped case.
This commit is contained in:
12
python/testData/paramInfo/CollectionsNamedTupleReplace.py
Normal file
12
python/testData/paramInfo/CollectionsNamedTupleReplace.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from collections import namedtuple
|
||||
|
||||
|
||||
MyTup1 = namedtuple("MyTup1", "bar baz")
|
||||
|
||||
|
||||
class MyTup2(namedtuple("MyTup2", "bar baz")):
|
||||
pass
|
||||
|
||||
|
||||
MyTup1(1, 2)._replace(<arg1>)
|
||||
MyTup2(1, 2)._replace(<arg2>)
|
||||
Reference in New Issue
Block a user