Wing doesn't print repr of dataclasses in some cases
I've noticed that Wing doesn't print a full repr of some dataclasses in the debug console. For example, a dataclass containing a builtin datetime
as one of its fields prints it in its repr, while one using a pendulum.DateTime
does not. Is this deliberate? Is there a way to make Wing print all contents, similar to how it would print a namedtuple?
EDIT: I think I was wrong about what triggers this; I'm now able to reproduce it using builtin datetimes, but only if the pprint option is checked in the debug console preferences. I've updated the example below to use datetime
.
For example:
from dataclasses import dataclass
import datetime
import typing as tp
@dataclass
class A:
f: tp.Any = None
g: tp.Any = None
# Wing shows this as `A(f=1, g=2)` in the debug console:
A(f=1, g=2)
# Wing shows this as `A()` in the debug console when the pprint option is checked.
A(datetime.datetime.now(), datetime.datetime.now())
Here's a screenshot to prove I'm not crazy: link awaiting moderation
Comments