more code polishing for pylint