Skip to content

Applying the PEP8 style guide#92

Open
Rad-hi wants to merge 5 commits intoailia-ai:mainfrom
Rad-hi:main
Open

Applying the PEP8 style guide#92
Rad-hi wants to merge 5 commits intoailia-ai:mainfrom
Rad-hi:main

Conversation

@Rad-hi
Copy link
Copy Markdown

@Rad-hi Rad-hi commented Sep 13, 2024

This PR aims at making the majority of the code PEP8 compliant (where possible, and reasonable).

The detection of the non-compliance was done by using flake8 (python3 -m pip install flake8 && python3 -m flake8). It's to note that the changes were not done using an autoformatter to avoid unintentional changes.

The file setup.cfg was added to determine the behavior of flake8 where I introduced some custom behavior:

  • max-line-length = 130 (by default, it's 79): this choice was made with the idea that 80 columns screens are a thing of the past.
  • ignore:
    • E402: the find_util_path function that was introduced in PR#91 is required to be called before importing the util module. But flake8 doesn't like that because the PEP8 style guide mandates that all imports happen before any function definitions/calls (thus the special case of no-compliance).
    • E266: too many leading '#' for block comment, this has been ignored because it would require a lot of additional refactorings to be fixed, and it does not matter much (in my opinion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant