Adjust code to pass pylint score test