" If any return statement returns an expression, any return statements where no value is returned should explicitly state this as return None "  So if no return statement return an expression, no explicit return is needed at the end.  In other words, this function was within the rules and should be left as it was.