-
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
Out of memory error when passing a generic function into a generic callable protocol #7250
Comments
Protocol
Protocol
Protocol
I've found a similar code sample that causes pyright to enter an infinite loop, but it doesn't run out of memory. I suppose the nature of the bugs for all these examples is the same. This can also be related to #7141. def id[T](v: T) -> T:
return v
id((id, id)) |
I'm not sure if this is related to the topic, but I also managed to get OOM from pyright 1.1.360. "JavaScript heap out of memory": from datetime import datetime
from datetype import NaiveDateTime
from django.db.models import DateTimeField
def g() -> NaiveDateTime:
return datetime.now()
DateTimeField(default=g)
|
@minmax, that's a different issue. Could you please file a separate bug so it's tracked accordingly? Thanks! |
This is addressed in pyright 1.1.364. |
For the following code, pyright is doing something weird:
The error message is kinda funny:
If you add a second argument to
P
andf
like this......then pyright runs out of memory:
The text was updated successfully, but these errors were encountered: