Pyright can't detect return value is not None... #8909
Unanswered
apocalypse2012
asked this question in
Q&A
Replies: 1 comment
-
I presume this code is part of a class and that Here's my attempt to repro the issue based on the code you've provided. Pyright doesn't generate any type errors in this case, so there must be some missing details. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following code report an error on any value returned by get_resources() that is treated like a dict.
Pyright: "values" is not a known attribute of "None"
There is no way to return a None value from that method and it is annotated to reflect that. How do keep this from occurring? I see no way for a None value to fall through...
Beta Was this translation helpful? Give feedback.
All reactions