john-bodley commented on a change in pull request #9586: [mypy] Enforcing
typing for a number of modules
URL:
https://github.com/apache/incubator-superset/pull/9586#discussion_r410971304
##########
File path: superset/connectors/druid/models.py
##########
@@ -823,6 +823,7 @@ def granularity(
if origin:
dttm = utils.parse_human_datetime(origin)
+ assert dttm
Review comment:
The `parse_human_datetime` allows for an optional `str` and thus returns
`None`. This is somewhat of an anti-pattern (the check should occur before the
function call) and should be fixed at some stage.
----------------------------------------------------------------
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]