tianocore / edk2-basetools

EDK II BaseTools Python tools as a PIP module
Other
25 stars 35 forks source link

Fix Flake8 errors/warnings #57

Open Ayush1325 opened 2 years ago

Ayush1325 commented 2 years ago

What does the feature solve?

The EDK II Python Development Process Specification recommends using Flake8 for checking Python files. However, the current Basetools fails a lot of Flake8 checks. So I think it would be a good idea to fix them to improve the quality of the code.

Describe the solution

The Flake8 errors can be divided into two broad categories:

  1. Pydcodestyle errors: These errors are generated due to a violation of PEP8 conventions. This can be fixed pretty easily using formatter like autopep8. This can be tried out by using the following command:
    find . -name '*.py' -exec autopep8 --in-place '{}' \;
  2. PyFlakes and McCabe errors: These errors need manual intervention and thus are more complicated to fix.

Have you considered any alternatives?

No response

Additional context

No response

Ayush1325 commented 2 years ago

@BobCF It would be great if someone could approve or disapprove of this issue so that I or someone else can work on.

Since this is my first issue, feel free to mention if I'm not following the proper contributing process.