clean up docstring, remove negated condition, remove type declaration in test