PyCharm Type Hints: No warning using typing.NewType

Answered

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
2 comments
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

Please sign in to leave a comment.