Refactor PEP 661 sentinel handling to use a synthetic nominal class - #21894
Refactor PEP 661 sentinel handling to use a synthetic nominal class#21894edgarrmondragon wants to merge 1 commit into
Conversation
d1c7eeb to
574e043
Compare
This comment has been minimized.
This comment has been minimized.
574e043 to
0255ef7
Compare
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
0255ef7 to
785ebdc
Compare
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
I guess you want to cc @JelleZijlstra here. |
|
If this fits better in mypy's model, I'm OK with landing it, but it feels worse to me. A sentinel isn't its own type, it's a single object that is an instance of the type |
|
Maybe we can do the best of both worlds (less fragile, but fits @JelleZijlstra's mental model) by adding a test in |
I'd be happy with that compromise, but yeah I don't know if that's feasible. |
Related