Fix typing.NewType signature

This commit is contained in:
Dave Halter
2021-01-01 04:22:52 +01:00
parent 30e702de11
commit 85f45771f1
2 changed files with 10 additions and 7 deletions

View File

@@ -117,6 +117,10 @@ class X:
('from typing import List\nList[int](', None),
('from typing import Tuple\nTuple(', None),
('from typing import Tuple\nTuple[int](', None),
('from typing import Optional\nOptional(', None),
('from typing import Optional\nOptional[int](', None),
('from typing import Any\nAny(', None),
('from typing import NewType\nNewType(', 'NewType(name: str, tp: Type[_T]) -> Type[_T]'),
]
)
def test_tree_signature(Script, environment, code, expected):