You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/08/02 18:48:21 UTC

[GitHub] [incubator-superset] villebro commented on a change in pull request #7952: [security] Adding docstrings and type hints

villebro commented on a change in pull request #7952: [security] Adding docstrings and type hints
URL: https://github.com/apache/incubator-superset/pull/7952#discussion_r310253181
 
 

 ##########
 File path: superset/security.py
 ##########
 @@ -30,11 +31,17 @@
 )
 from flask_appbuilder.widgets import ListWidget
 from sqlalchemy import or_
+from sqlalchemy.engine.base import Connection
+from sqlalchemy.orm.mapper import Mapper
 
 from superset import sql_parse
 from superset.connectors.connector_registry import ConnectorRegistry
 from superset.exceptions import SupersetSecurityException
-from superset.utils.core import DatasourceName
+
+if TYPE_CHECKING:
+    from superset.models.core import Database, BaseDatasource
+
+from superset.utils.core import DatasourceName  # noqa: I202
 
 Review comment:
   Perhaps we should add ignoring of `I202` to `tox.ini`? @sturmer ran intro a few of those in #7643 and it seems `flake8` and `black` aren't aligned in their thinking on newlines.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org