[PATCH 3/7] actually raise intended exceptions #pylint