You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from typing import Any
import attr
@attr.s(auto_attribs=True, kw_only=True, slots=True)
class MyClass:
x: int
def my_serializer(record: Any, k: attr.Attribute, v: Any) -> Any:
return v
m = MyClass(x=1)
k = attr.asdict(m, value_serializer=my_serializer)
print(k)
generates the error:
error: Argument 1 to "asdict" has incompatible type "MyClass"; expected "AttrsInstance"
Running MyPy for the following code:
generates the error:
Related to: #987
Versions:
The text was updated successfully, but these errors were encountered: