diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 07544d66d2..9e0318456d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,12 +42,13 @@ repos: hooks: - id: mypy args: [--check-untyped-defs] - additional_dependencies: - [ + additional_dependencies: [ types-simplejson, types-python-dateutil, types-requests, - types-redis, + # types-redis 4.6.0.5 is failing mypy + # because of https://github.com/python/typeshed/pull/10531 + types-redis==4.6.0.4, types-pytz, types-croniter, types-PyYAML, diff --git a/superset/connectors/sqla/views.py b/superset/connectors/sqla/views.py index bce647dcda..d79f5f6358 100644 --- a/superset/connectors/sqla/views.py +++ b/superset/connectors/sqla/views.py @@ -411,6 +411,7 @@ class TableModelView( # pylint: disable=too-many-ancestors "database": QuerySelectField( "Database", query_func=lambda: db.session.query(models.Database), + get_pk_func=lambda item: item.id, widget=Select2Widget(extra_classes="readonly"), ) }