polishing code for pylint