Replies: 1 comment
-
I'm not entirely sure what you mean by "report empty containers". Empty containers are often used in Python code, and they are typically not a problem from a typing standpoint. Often, a type checker can infer their type from a bidirectional inference context. In cases where pyright can't do this, it will infer the type If you want to detect the use of a value with an unknown or partially-unknown type, you can use the Code sample in pyright playground # pyright: strict
d = []
d.append(1) # Type of "append" is partially unknown |
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
-
Is there any option for pyright to report empty containers?
Beta Was this translation helpful? Give feedback.
All reactions