Skip to content

Commit

Permalink
fix all the tests I broke :)
Browse files Browse the repository at this point in the history
  • Loading branch information
sydney-runkle committed May 1, 2024
1 parent dfc532b commit e1cd5b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/python-fastui/fastui/components/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,13 @@ class Form(BaseForm):
"""The type of the component. Always 'Form'."""


FormFieldsModel = _t.TypeVar('FormFieldsModel', bound=BaseModel)
FormFieldsModel = _t.TypeVar('FormFieldsModel', bound=pydantic.BaseModel)


class ModelForm(BaseForm):
"""Form component generated from a Pydantic model."""

model: _t.Type[BaseModel] = pydantic.Field(exclude=True)
model: _t.Type[pydantic.BaseModel] = pydantic.Field(exclude=True)
"""Pydantic model from which to generate the form."""

type: _t.Literal['ModelForm'] = 'ModelForm'
Expand Down
2 changes: 1 addition & 1 deletion src/python-fastui/fastui/components/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Table(BaseModel, extra='forbid'):
columns: _t.Union[_t.List[display.DisplayLookup], None] = None
"""List of columns to display in the table. If not provided, columns will be inferred from the data model."""

data_model: _t.Union[_t.Type[BaseModel], None] = pydantic.Field(default=None, exclude=True)
data_model: _t.Union[_t.Type[pydantic.BaseModel], None] = pydantic.Field(default=None, exclude=True)
"""Data model to use for the table. If not provided, the model will be inferred from the first data item."""

no_data_message: _t.Union[str, None] = None
Expand Down

0 comments on commit e1cd5b4

Please sign in to comment.