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
Adds the @attr decorator sugar over the getter=/setter= constructors from #392 (ADR 0018, 0014 review update).
Scope
@attr is a decorator only, two forms: bare @attr and parameterised @attr(precision=3, units="V", update_period=0.5) on an async getter, plus property-style @my_attr.setter on the writer.
getter only → AttrR; getter + .setter → AttrRW (deferred creation). There is no@attr_r/@attr_rw.
Adds the
@attrdecorator sugar over thegetter=/setter=constructors from #392 (ADR 0018, 0014 review update).Scope
@attris a decorator only, two forms: bare@attrand parameterised@attr(precision=3, units="V", update_period=0.5)on an async getter, plus property-style@my_attr.setteron the writer.AttrR; getter +.setter→AttrRW(deferred creation). There is no@attr_r/@attr_rw.attr()factory — the procedural spelling isAttrR(getter=…)/AttrRW(getter=…, setter=…)(from getter/setter IO rework; remove AttributeIORef and DataType #392);@attris pure sugar over it.AttrW-only (write, no getter) is rare → written longhand asAttrW(setter=…), no decorator.Update[T]); decorator kwargs typedUnpack[*Meta], validated against it. Getter docstring → attributedescription.Unbound*bind machinery (fresh objects per instance, no prototype/deepcopy). Include the "FastCS for PyTango users" docs page.@attr); Example 2 — attr getter/setter via __init__ (temperature backend) #404's__init__getter/setter can also be shown in@attrform for contrast.Key files (§9)
src/fastcs/methods/(Unbound*bind machinery),attributes/.Acceptance
uv run --locked tox -e pre-commit,type-checking,testsgreen; #398 (hello-world) green against@attr.ADR: 0018, 0014
Parent: #388
Blocked by: #392