Forward references in methods #1180
Answered
by
erictraut
superbobry
asked this question in
Q&A
|
Hi everyone, How should a type checker resolve the return type of ? According to PEP 484
which, I think, implies that the reference A few more motivating examples |
Answered by
erictraut
May 10, 2022
Replies: 1 comment 7 replies
|
That's correct. Mypy and pyright both interpret it this way. However, I'd recommend against using conflicting names like this. It harms readability, and you will inevitably see inconsistencies across tools. |
7 replies
Answer selected by
superbobry
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's correct. Mypy and pyright both interpret it this way. However, I'd recommend against using conflicting names like this. It harms readability, and you will inevitably see inconsistencies across tools.