Skip to main content

DocField

ClassDataClassSource

DocField(
name: str,
type: str,
default: str = "",
init_skipped: bool = False,
descr: str = "",
doc: str = ""
)

The docstring of a data model/class field.

Fields

NameTypeRequired
Description
namestrThe name of the field.
typestrThe type of the field. It is usually the typehint (annotation).
defaultstrThe formatted default value of the field.
init_skippedboolA flag. If specified, this field should be skipped in the initialization.
descrstrThe docstring of the field, it is defined in codes.
docstrThe extra dynamic/run-time docstring of the field. It is not used when rendering the documentation.