Skip to content

Commit c7b0602

Browse files
committed
Update the docs for BaseField initializer
1 parent f498bd3 commit c7b0602

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

clorm/orm/core.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,7 +1359,8 @@ class DateField(StringField):
13591359
value when none has been specified.
13601360
13611361
index (bool): Determine if this field should be indexed by default in a
1362-
``FactBase```. Defaults to ``False``.
1362+
``FactBase```. Defaults to ``False``. WARNING: this parameter will be deprecated in
1363+
a future version of Clorm. Indexing should be explicitly set in the FactBase object.
13631364
13641365
"""
13651366

@@ -1370,6 +1371,21 @@ def __init__(
13701371
default_factory: Callable[[], Any] = MISSING,
13711372
index: Any = MISSING,
13721373
) -> None:
1374+
"""Initialize a field instance.
1375+
1376+
Args:
1377+
1378+
default: A default value to be used when instantiating a ``Predicate`` object and no
1379+
value has been specified.
1380+
1381+
default_factory: A unary function (ie. a function with no arguments) for generating a
1382+
value when none has been specified.
1383+
1384+
index (bool): Determine if this field should be indexed by default in a
1385+
``FactBase```. Defaults to ``False``. WARNING: this parameter will be deprecated in
1386+
a future version of Clorm. Indexing should be explicitly set in the FactBase object.
1387+
1388+
"""
13731389
self._index = index if index is not MISSING else False
13741390
if default is not MISSING and default_factory is not MISSING:
13751391
raise ValueError("can not specify both default and default_factory")

0 commit comments

Comments
 (0)