PyCharm Type Hints: No warning using typing.NewType

已回答

Hi, Why doesn't this result in a warning?

from typing import NewType

Foo = NewType('Foo', str)
Bar = NewType('Bar', str)

def f():
    # type: () -> Foo
    return Bar()

I'm using PyCharm Community Edition 2017.2.3 and Python 2.7.10.

1
Avatar
Permanently deleted user

Anyone?

0

Please vote for https://youtrack.jetbrains.com/issue/PY-21302 to increase its priority and be notified about updates.

0

请先登录再写评论。