conlist
A wrapper around [list][] that adds validation.
def conlist(
item_type: type[AnyItemType],
min_length: int | None = None,
max_length: int | None = None,
unique_items: bool | None = None
) - > type[list[AnyItemType]]
A wrapper around [list][] that adds validation.
Parameters
| Name | Type | Description |
|---|---|---|
| item_type | type[AnyItemType] | The type of the items in the list. |
| min_length | `int | None` = None |
| max_length | `int | None` = None |
| unique_items | `bool | None` = None |
Returns
| Type | Description |
|---|---|
type[list[AnyItemType]] | The wrapped list type. |