Remove useless intermediate variable
Use exceptions in place of assertions -> VersionError
version_from_string(): match end of the string instead full string
Let version_from_string() raises an exception if hook name is incorrect