Skip to content

Field

autogen.beta.events.base.Field #

Field(default=Ellipsis, *, default_factory=Ellipsis, init=True, repr=True, compare=True, hash=None, kw_only=True)
Source code in autogen/beta/events/base.py
def __init__(
    self,
    default: Any = Ellipsis,
    *,
    default_factory: Callable[[], Any] | EllipsisType = Ellipsis,
    init: bool = True,
    repr: bool = True,
    compare: bool = True,
    hash: bool | None = None,
    kw_only: bool = True,
) -> None:
    self.name = ""

    self.init = init
    self.repr = repr
    self.compare = compare
    self.hash = hash
    self.kw_only = kw_only

    self._default = default
    self._default_factory = default_factory

name instance-attribute #

name = ''

init instance-attribute #

init = init

repr instance-attribute #

repr = repr

compare instance-attribute #

compare = compare

hash instance-attribute #

hash = hash

kw_only instance-attribute #

kw_only = kw_only

get_default #

get_default()
Source code in autogen/beta/events/base.py
def get_default(self) -> Any:
    if self._default_factory is not Ellipsis:
        return self._default_factory()
    return self._default

is_ #

is_(other)
Source code in autogen/beta/events/base.py
def is_(self, other: Any) -> Condition:
    return OpCondition(operator.is_, self.name, other, self.event_class)