tools: add tool for pep8 reformatting

This calls the PEP8 linter called autopep8:

https://github.com/hhatto/autopep8

So we can make autotest to fully adhere to PEP8,
since there's a tool that can enforce the standard.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
tools: add pep8 check into check_patch

Integrate the PEP8 linter into the virt-test full
tree and patch verification process. It works by
verifying whether the PEP8 linter modified the file in
place, if it did, it means there are non compliances
in the code.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Signed-off-by: yangdongsheng <yangds.fnst@cn.fujitsu.com>
tools: Add codespell

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/check_patch.py: Add codespell check

Integrate codespell to our own check_patch.py script.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
run_pep8 refactor

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Mass spelling fixes

Using the program codespell

https://github.com/lucasdemarchi/codespell

We found a number of spelling mistakes, that could be
found and fixed. The result of the automated script
was double checked, of course.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/run_pep8.py: Ignoring E501,W601
PEP8 mass fixes

With the help of the PEP8 script, a semi-automated clean
of the code base was made, and effectively changing some
of the coding style rules of our code base:

 * No more 2 lines spacing among functions
 * No more combined module imports

In the end, it was going to be too difficult to take
into consideration E501 (line length > 80) errors and
W601 (.has_key() is deprecated), so these were ignored,
at least for now.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
tools/check_patch.py: Fix incorrect logic

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>