Add type arguments to generic types #2181
-
|
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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Got a PR ready for this. |
Beta Was this translation helpful? Give feedback.
Got a PR ready for this.