john-bodley commented on a change in pull request #9378: chore: bump black to 19.10b0 and mypy to 0.770 URL: https://github.com/apache/incubator-superset/pull/9378#discussion_r402689524
########## File path: superset/views/core.py ########## @@ -188,7 +188,10 @@ def check_datasource_perms( except SupersetException as e: raise SupersetSecurityException(str(e)) - viz_obj = get_viz( # type: ignore + if datasource_type is None: Review comment: I dislike the `get_datasource_info(...)` method from a typing perspective. The `datasource_type` will be non-None (the method raises otherwise) and thus I think `assert datasource_type` is suffice from a type checking standpoint. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org