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

Code formatting using black (infra) #1163

Merged
merged 15 commits into from
Apr 11, 2024
Merged

Code formatting using black (infra) #1163

merged 15 commits into from
Apr 11, 2024

Commits on Apr 11, 2024

  1. Set line length to 79 when calling black

    black uses pyproject.toml to store its configuration. Update the
    different projects in the monorepo to match line length of 79 when
    calling black.
    
    See black documentation[1] for more information.
    
    [1]
    https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    9ec3ca8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    52746eb View commit details
    Browse the repository at this point in the history
  3. Add black GitHub Action

    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    0ca6c6d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    1c38c49 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a63920c View commit details
    Browse the repository at this point in the history
  6. Format checkbox-ng using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    1af0efd View commit details
    Browse the repository at this point in the history
  7. Format checkbox-support using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    6908d78 View commit details
    Browse the repository at this point in the history
  8. Format providers in contrib area using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    0728b42 View commit details
    Browse the repository at this point in the history
  9. Format miscelanneous code using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    2e45edc View commit details
    Browse the repository at this point in the history
  10. Format metabox using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e2508ed View commit details
    Browse the repository at this point in the history
  11. Format providers using black

    Command used:
    
        black . --line-length 79 --extend-exclude "/vendor/"
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    b963cd7 View commit details
    Browse the repository at this point in the history
  12. Ignore E203 (Whitespace before ':')

    As explained in this issue[1], E203[2] is not PEP 8 compliant so it
    should be ignored when running flake8.
    
    Black is now being used in the codebase, and it takes care of the
    formatting.
    
    [1] psf/black#315
    [2] https://www.flake8rules.com/rules/E203.html
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    6736ce7 View commit details
    Browse the repository at this point in the history
  13. Ignore flake8 complaints for a few specific lines in the base provider

    Although Black is configured at 79 chars line length, it keeps a few
    lines to 80, 81 or 82 chars. Flake8 will complain about this, but we can
    ignore these.
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    c3a18c9 View commit details
    Browse the repository at this point in the history
  14. Add .git-blame-ignore-revs

    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    e77ab97 View commit details
    Browse the repository at this point in the history
  15. Remove .git-blame-ignore-revs

    Waiting until the squashed commit gets merged, and will create one
    afterwards.
    pieqq committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    7745ec3 View commit details
    Browse the repository at this point in the history