Replies: 1 comment 3 replies
-
I'm not a typing expert, but I'll try to answer these questions in reverse:
>>> class Node:
... next: Node
...
Traceback (most recent call last):
File "<python-input-0>", line 1, in <module>
class Node:
next: Node
File "<python-input-0>", line 2, in Node
next: Node
^^^^
NameError: name 'Node' is not defined. Did you mean: 'None'? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TC006 got stabilized recently. It argues that types in cast should be quoted as they may contain forward references as well as that it avoid checking complex types at runtime.
Quoted imports won't trigger an import error if they are not imported or do not exist or are mistyped.
And python documentation states that at runtime cast does not evaluate anything.
Beta Was this translation helpful? Give feedback.
All reactions