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 2020/09/23 08:20:50 UTC

[GitHub] [incubator-superset] kkucharc commented on a change in pull request #10978: fix: changed several pylint checks in dashboard module

kkucharc commented on a change in pull request #10978:
URL: https://github.com/apache/incubator-superset/pull/10978#discussion_r493299955



##########
File path: superset/databases/utils.py
##########
@@ -44,7 +44,7 @@ def get_indexes_metadata(
 def get_col_type(col: Dict[Any, Any]) -> str:
     try:
         dtype = f"{col['type']}"
-    except Exception:  # pylint: disable=broad-except
+    except KeyError:

Review comment:
       Thanks @dpgaspar for noticing this. Maybe I'm lacking the bigger picture here so excuse me if the question would be silly, but In that case why we are trying to do `f"{col['type']}"` instead just having `dtype = col["type"].__class__.__name__` without `try catch`?




----------------------------------------------------------------
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



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