-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
AssertionError on version 0.960 #12868
Comments
I don't know if this could be related, but there seems to be issues with how https://github.com/DataDog/riot/runs/6594827098?check_suite_focus=true The logs show that the latest version of |
Thanks for reporting this! Getting this as well. |
Here is a small reproducer for the attrs crash: import attr
@attr.s
class C:
@attr.s
class D:
pass
x = attr.ib(type=list[D]) As a workaround, moving the nested class to the module top level should fix the crash. I'm working on a fix. |
@P403n1x87 That's a separate issue, and it looks like it's related to #12798. Here's a skeleton of a workaround for the issue: from dataclasses import dataclass, InitVar, field
@dataclass
class D:
_x: InitVar[int]
x: str = field(init=False)
def __post_init__(self, _x: int) -> None:
self.x = str(_x) Feel free to create a separate issue if this isn't sufficient to resolve your issue. |
@JukkaL ah this makes a lot of sense, thanks! I guess this is an actual improvement from |
Bug Report
We are using the ddtrace Python package.
Consider the following file:
Running
mypy test.py
passes without issues on version0.950
but when run on version0.960
the following is printed:I tried using the
--pdb
and--tb
flags to get the traceback, or see which part of the library is causing this but was unable to do so.I tried clearing the mypy cache, which didn't help as well.
Is this an issue with mypy, the library or both?
Your Environment
The text was updated successfully, but these errors were encountered: