Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applying the PEP8 style guide #92

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Applying the PEP8 style guide #92

wants to merge 5 commits into from

Conversation

Rad-hi
Copy link

@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