john-bodley commented on a change in pull request #9416: [mypy] Enforcing 
typing for some modules
URL: 
https://github.com/apache/incubator-superset/pull/9416#discussion_r399854728
 
 

 ##########
 File path: superset/commands/exceptions.py
 ##########
 @@ -25,25 +25,25 @@
 class CommandException(SupersetException):
     """ Common base class for Command exceptions. """
 
-    def __repr__(self):
+    def __repr__(self) -> str:
         if self._exception:
-            return self._exception
-        return self
+            return repr(self._exception)
 
 Review comment:
   This seemed like a bug, i.e., `__repr__` should return a `str`.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to