villebro commented on a change in pull request #10946:
URL:
https://github.com/apache/incubator-superset/pull/10946#discussion_r492167370
##########
File path: superset/connectors/sqla/views.py
##########
@@ -241,30 +242,73 @@ class SqlMetricInlineView( # pylint:
disable=too-many-ancestors
edit_form_extra_fields = add_form_extra_fields
+class RowLevelSecurityListWidget(
+ SupersetListWidget
+): # pylint: disable=too-few-public-methods
+ template = "superset/models/rls/list.html"
+
+ def __init__(self, **kwargs: Any):
+ kwargs["appbuilder"] = current_app.appbuilder
+ super().__init__(**kwargs)
+
+
class RowLevelSecurityFiltersModelView( # pylint: disable=too-many-ancestors
SupersetModelView, DeleteMixin
):
datamodel = SQLAInterface(models.RowLevelSecurityFilter)
+ list_widget = cast(SupersetListWidget, RowLevelSecurityListWidget)
Review comment:
For some reason mypy flags `Type[RowLevelSecurityListWidget]` as being
incompatible with `Type[SupersetListWidget]` which is required for
`list_widget`, despite extending from it. Either I'm missing something here or
mypy is just flagging a false positive here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]