removes trailing whitespace per pylint feedback