-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
attribute is incorrectly Any
when ParamSpec
decorated function is referenced in itself followed by an if statement with a class that has a method in it
#16496
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
Comments
Any
when decorated function is referenced in itself followed by an if statement with a class that has a method in itAny
when ParamSpec
decorated function is referenced in itself followed by an if statement with a class that has a method in it
Reveals |
@sterliakov I am really curious why that PR fixed this? Did we at some point broke setting |
@ilevkivskyi I just bisected:) This also puzzles me, that PR resulted in multiple primer hits that seem unrelated. Some other bug(s) just masked by my fix to binder? That's exactly why I asked to review the "seems fixed" list: some changes may treat the immediate symptoms on a given repro without addressing the core problem. |
@sterliakov if all_reachable and all(
x is not None and not x.from_assignment for x in resulting_values
):
continue which is a good thing to say, binder should not create things out of thin air (a.k.a This likely fixed some problems for real, but another thing is that it may also "fixed" examples in some issues that are often oversimplified. For example, although original example here now works as expected, simply adding Anyway, I don't think there is any action item for now, except I am going to fix this particular issue for real, since it is a nasty one. Right now it only affects situations with nested functions, but in longer term it is important to prepare for deferring top-levels. |
Fixes #16496 for real. The fix is trivial, just save and restore the previous value.
playground
The text was updated successfully, but these errors were encountered: