parent
b717ad9de0
commit
c2712fd102
|
@ -0,0 +1 @@
|
|||
Added forgotten ``attr.Attribute.evolve()`` to type stubs.
|
|
@ -83,6 +83,8 @@ class Attribute(Generic[_T]):
|
|||
kw_only: bool
|
||||
on_setattr: _OnSetAttrType
|
||||
|
||||
def evolve(self, **changes: Any) -> "Attribute": ...
|
||||
|
||||
# NOTE: We had several choices for the annotation to use for type arg:
|
||||
# 1) Type[_T]
|
||||
# - Pros: Handles simple cases correctly
|
||||
|
|
|
@ -242,6 +242,10 @@ class NGFrozen:
|
|||
|
||||
ngf = NGFrozen(1)
|
||||
|
||||
attr.fields(NGFrozen).x.evolve(eq=False)
|
||||
a = attr.fields(NGFrozen).x
|
||||
a.evolve(repr=False)
|
||||
|
||||
|
||||
@attr.s(collect_by_mro=True)
|
||||
class MRO:
|
||||
|
|
Loading…
Reference in New Issue