-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Crash on unpacking after invalid base class #2244
Comments
Thanks for the report! Do you know if there's a way this can happen without something as unlikely as |
@gnprice It fails exactly the same way for all invalid bases. For example (note the typo): from typing import Typo
class X(Typo):
...
x = X()
a, b = x also it fails for bare from typing import Union
class X(Union):
...
x = X()
a, b = x |
@gnprice Another examples are class X(SomeTypo):
...
a, b = X() |
I'll take this. Crashes like this are usually best dealt with by adding a None check somewhere. There are probably many different scenarios to get a crash by using a class involved in an error, and I don't want to go hunting for them, but this seems a pretty common scenario given that it's any invalid base class and not too strange a use afterwards. |
Simplest way to reproduce:
Output:
This could be related to #1065
But in this case there are no path, rather than two paths.
The text was updated successfully, but these errors were encountered: