Type annotation doesn't see local class

已回答

When attempting to use type hinting as per this JetBrains blog post, PyCharm reports that a locally defined class does not exist.

The suggested action on ClearlyExists is to create the class "ClearlyExists." When you do that, it still has the same complaint. I suspect I have something mis-configured. What?

0

Hi! ClearlyExists class should be defined before well_typed function to make annotation resolves correctly. Please move class declaration on top.

0
Avatar
Permanently deleted user

Thank you, this is resolved.

0

请先登录再写评论。