etr2460 commented on a change in pull request #9138: [mypy] Enforcing typing for db_engine_specs URL: https://github.com/apache/incubator-superset/pull/9138#discussion_r379242552
########## File path: superset/db_engine_specs/base.py ########## @@ -486,14 +496,13 @@ def extract_error_message(cls, e: Exception) -> str: return f"{cls.engine} error: {cls._extract_error_message(e)}" @classmethod - def _extract_error_message(cls, e: Exception) -> str: + def _extract_error_message(cls, e: Exception) -> Optional[str]: """Extract error message for queries""" return utils.error_msg_from_exception(e) @classmethod - def adjust_database_uri(cls, uri, selected_schema: Optional[str]): - """Based on a URI and selected schema, return a new URI - + def adjust_database_uri(cls, uri: URL, selected_schema: Optional[str]) -> None: Review comment: sometimes returning the object is nice so you can string together mutations on an object. Maybe we should keep returning it and type it appropriately? ---------------------------------------------------------------- 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