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
Pyrefly infers that a dict is a typed dict and gives a confusing error as result. The root cause of this error is that we do not union an unknown value in a dict. pyright, mypy and ty all widen the value to include the union of unknown/Any whereas Pyrefly does not.
At a minimum this error should be a bad assignment or argument error like pyrightmypyty. But we probably should just allow the union and put the stricter behavior behind a flag.
Pyrefly infers that a dict is a typed dict and gives a confusing error as result. The root cause of this error is that we do not union an unknown value in a dict. pyright, mypy and ty all widen the value to include the union of unknown/Any whereas Pyrefly does not.
At a minimum this error should be a bad assignment or argument error like pyright mypy ty. But we probably should just allow the union and put the stricter behavior behind a flag.
https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEArugNbq4Du6dENxulAFzoBVFm04AddFJrw0Acxh0AvHWBS6muhJCYYANwgBjGAH0ImHYm26DxmAFoLOgDQatOvYZOmATFZExDml0AF8pKUoDGFQoUwFSYhgAClk4BRgASgj0NIyAbR1UAQFUIwALWXQBHQBdFTUdHlRFAJ0BcoYabAcGSigdcPQQFxAyKLAoUkIBWigKAGI6AAVSCam6NCw8fDojXHRIeT7iiAPCKSWAZRglcpLiOEQAemfxmEnp-nlnmHRnzC4IxwZ77Q4QY6UU4HZ50MD8OiofSoaCobCwPYHI4nARnLi4Yi4g5wC7oMgdA4OfQwShwPENHQAZkIAEZ-CApBBDjSHOwIB0HJBaQJenAYMowLExVJ8jTqLTalImDw%2BIIYJgHJgIFEjLjqQ0AOQQthRA1SNgiqIARwY2vVDmYMFIDjKJnShvYqEo6DNw1CozKepgADFoDAKFscAQSORQkA