reformat code to be a little more compatible with pylint