Add type arguments to generic types #2181
Answered
by
relsunkaev
RobertCraigie
asked this question in
Potential Issue
|
I use pyright to type check my code. In strict mode it will report an error if a type is unknown or partially unknown. A type is considered unknown if one or some of it's parts or not specified, e.g. # a is unknown
def foo(a) -> None:
...
# b is partially unknown
def foo(b: dict) -> None:
...
# c is known
def foo(c: dict[str, str]) -> None:
...In essence the reasoning behind these diagnostics is for documentation, performance and to ensure consistent behaviour between different tools. For more details see their documentation, Typing Guidance for Python Libraries. I encountered these diagnostics because of the missing type arguments for the |
Answered by
relsunkaev
Jun 24, 2022
Replies: 1 comment
Answer selected by
lovelydinosaur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Got a PR ready for this.