Describe the bug
This is probably an extreme edge-case, but if I redefine return_value at MagicMock().__str__, pyright says Cannot assign to attribute "return_value" for class "function", even though it is valid code in runtime.
VS Code extension or command-line
Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
Describe the bug This is probably an extreme edge-case, but if I redefine
return_value
atMagicMock().__str__
, pyright saysCannot assign to attribute "return_value" for class "function"
, even though it is valid code in runtime.Code or Screenshots![image](https://github.com/microsoft/pyright/assets/68118654/b4a9f671-ef43-428d-949e-dfc987c4b14d)
Code sample in pyright playground
VS Code extension or command-line Are you running pyright as a VS Code extension, a language server in another editor, integrated into Pylance, or the command-line tool? Which version?
command-line, 1.1.370