From ab49f4f9e4bd2f046009f9b6ffa8816b7b5c0093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Mon, 4 Nov 2024 16:57:01 +0100 Subject: [PATCH] Set more precise type for filter_column --- c2cgeoform/views/abstract_views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/c2cgeoform/views/abstract_views.py b/c2cgeoform/views/abstract_views.py index e34ef95e..d29563b8 100644 --- a/c2cgeoform/views/abstract_views.py +++ b/c2cgeoform/views/abstract_views.py @@ -8,6 +8,7 @@ import sqlalchemy.orm.attributes import sqlalchemy.orm.properties import sqlalchemy.schema +import sqlalchemy.sql.elements import sqlalchemy.sql.expression from deform import Form, ValidationFailure # , ZPTRendererFactory from deform.form import Button @@ -99,8 +100,8 @@ def __init__( key: Optional[str] = None, label: Optional[str] = None, renderer: Optional[Callable[[T], JSONDict]] = None, - sort_column: Optional[sqlalchemy.sql.expression.ColumnElement[Any]] = None, - filter_column: Optional[sqlalchemy.schema.Column[Any]] = None, + sort_column: Optional[sqlalchemy.sql.elements.ColumnElement[Any]] = None, + filter_column: Optional[sqlalchemy.sql.elements.ColumnElement[Any]] = None, visible: bool = True, ): self._attr = _getattr(model, attr)