Closed JamesGibo closed 1 year ago
Replace everywhere default={} or default=[] used with factory=dict or factory=list instead, as if one value changed all change.
default={}
default=[]
factory=dict
factory=list
https://www.attrs.org/en/stable/api-attr.html#attr.ib
>>> import attr >>> @attr.s ... class X: ... d = attr.ib(default={}) ... >>> a = X() >>> b = X() >>> a.d['test']='test' >>> b X(d={'test': 'test'}) >>>
Thanks to @ilia-ilin-jiji for spotting
Hey @JamesGibo I would like to work on this. Could you please assign?
Closed in #593
Replace everywhere
default={}
ordefault=[]
used withfactory=dict
orfactory=list
instead, as if one value changed all change.https://www.attrs.org/en/stable/api-attr.html#attr.ib
Thanks to @ilia-ilin-jiji for spotting