-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[red-knot] Add custom __setattr__
support
#16748
base: main
Are you sure you want to change the base?
Conversation
|
I wonder if it's actually helpful to any type checkers for that definition to exist in typeshed? Sure, it exists at runtime, so we'd have to add an allowlist entry in typeshed's tests if we omitted it in the stubs (or typeshed's tests would complain that there was a method at runtime that was missed in the stubs). But it's okay to add allowlist entries like that if the costs of including the method definition in the stubs outweigh the benefits — that may be the case here. It might be worth sending an experimental PR to typeshed seeing what happens on mypy_primer if it's removed? |
Following up: we discussed this on Discord and realised that removing |
I'm going to leave this open for now, because I think it makes sense to wait for #16521. But if someone wants to pick this up, please go ahead. |
0d99e37
to
4bd3c2b
Compare
4bd3c2b
to
a21e1d1
Compare
Summary
I tried to implement this today, but I believe we need a similar approach as in #16512 where dunder lookups should skip symbols on
object
.Test Plan