Currently, many parts of our code don't follow Python coding style. Now, please clean it.
Please also group and arrange the import lines.
Objective
Follow PEP8 as much as possible. For line length, it can be 120 chars (PEP8 suggests 79, but I think that number is only relevant for old display device, while all of us now use wide screen monitor).
Don't leave unused "import", unused variable. This can be detected with pyflakes tool.
Tools
This work doesn't need much brain. So we should leave it for tools. I recommend pycodestyle, pyflakes. They help you find problematic lines, but not fix for you. Other than that, please install appropriate plugins to your code editor to integrate the tools.
Describe the bug
Currently, many parts of our code don't follow Python coding style. Now, please clean it. Please also group and arrange the
import
lines.Objective
Tools
This work doesn't need much brain. So we should leave it for tools. I recommend pycodestyle, pyflakes. They help you find problematic lines, but not fix for you. Other than that, please install appropriate plugins to your code editor to integrate the tools.
This is how you can do in VS Code: