Fix 'imported but unused' PEP8 errors