check_rows_partially: some stylistic fixes

removed whitespace
made sure all variables were used
other changes to keep with the pep8