Danny Yang
Danny Yang
I believe this is a gap in our control flow handling, where calls to `NoReturn` functions are not handled properly.
Another example: https://pyrefly.org/sandbox/?project=N4IgZglgNgpgziAXKOBDAdgEwEYHsAeAdAA4CeS4ATrgLYAEALqcROgOZ0Q3G6UN0AqADroRmGGDphcuABQBKRCLorGlUkvSrtdOHQC8dISFRxMx5apj4AxjGL8AorfsMIudJp2rsqSgpFLFWJKVgZZOHlArAk6X395OgBaAD46ADlcACUYBgBXSk8gukpUCDgYOmc7B3d0APQQABoQMkoJKFJCBlooCgBiOgAFUnawTt0MHAI6Gw9INgLUNw9CEUGAZRhKgAsGBmI4RAB6Y7aOrt42Y5h0Y8xcGzhjufQFpZW7qV46VAA3MpQVDYWCzeYQRalT50XC1DxwNboMgMHYeJJ-GCUOB1AxGEAAZkIAEYAEwWRoAXxaqBsbgxADFoDAKGgsHgiGQQBSgA
For comparison, mypy gives "invalid assignment target", and after lifting `super(B, B())` into a variable it gives "super has no attribute a" pyright is OK with that snippet
We probably want to make `check_attr_set_and_infer_narrow` and `check_attr_delete` fail for `AttributeBase::SuperInstance`. Should be a relatively small change. Integration tests should be added in pyrefly/lib/test
Assigned, thanks!
i wonder if this is related to the dataclass_transform on the metaclass for RootModel cc @rchen152 wdyt?
There's a temporary hack in place that substitutes type vars with their upper bound during attribute resolution, marked with `TODO(#119)` in the codebase
Hi, thanks for reporting this. The behavior you describe is not part of the typing spec, but we are aware that it's a common pattern and plan to implement some...
cc @xaskii the last time we discussed this, I think we said there would be 2 ways to do it: 1. add an anonymous structural dictionary type to represent literal...
@BVMiko are you still working on this, or can I take over and make another PR that addresses the comments?