You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the bug report. This will be fixed in the next release.
If you're curious, the problem is due to the fact that the standard typeshed stubs don't declare arithmetic operators (like __add__) as taking parameters of type int, float or complex. Because of this, the type checker needs to special-case these conditions. My special-case code didn't handle the case where the parameter type was a union of an unknown and one of these known types.
Describe the bug
Pyright produces problem for simple "a + 1" as Operator '+' not supported for types 'int' and 'Enum[Unknown, Type[int]]'
To Reproduce
create a new .py file and write
Expected behavior
No problem should be produced
Screenshots or Code
VS Code extension or command-line
I am running pyright as a VS Code extension 1.0.17
Additional context
When I reload the vscode window, the problem goes away.
The text was updated successfully, but these errors were encountered: