Describe the bug
Given the following code:
from __future__ import annotations
from typing import Any, Generic, TypeVar
T = TypeVar('T')
class Thing(Generic[T]):
prop: T
class OtherThing:
...
def func(thing: Any) -> None:
if isinstance(thing, Thing | OtherThing):
...
An error is reported at line 17:
Expected type arguments for generic class "Thing"
Expected behavior
No errors are reported
VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, or the command-line tool?
Command line
Which version?
1.1.314
Describe the bug
Given the following code:
An error is reported at line 17:
Expected behavior
No errors are reported
VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, or the command-line tool?
Command line
Which version?
1.1.314