remove unused imports, fix typo, pylint
(cherry picked from commit a7edc0acde7a8da3c043c66e112653f2a656afa7)