px.result
용도
px.Results field의 description·unit metadata를 field 기본값 자리에서 선언합니다. 타입은 여전히 field annotation이 정합니다.
문법
python
px.result(*, description: str, unit: str | None = None)예제
python
from pipelinexlab import px
class CheckResults(px.Results):
ratio: float = px.result(description="Utilization ratio.")매개변수
description— 이 result의 한 문장 설명.unit— RFC-003 unit code. 생략하면 단위 없음.
반환
registry가 소비하는 내부 _PortSpec marker를 반환합니다. px.Results field 기본값 자리 밖에서는 사용하지 않습니다.
규칙
- field 이름이
portKey, annotation이 value type을 정합니다. - input 자리에 쓰면 이름 있는 거부를 받습니다.