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

Add pre-commit configuration and workflow #164

Merged
merged 3 commits into from
Jul 16, 2024
Merged

Commits on Jul 16, 2024

  1. Add pre-commit configuration and workflow

    Add a pre-commit [1] configuration in `.pre-commit-config.yaml` and a
    corresponding GitHub workflow to run the checks on pull requests.
    
    The pre-commit checks use ruff [2] for both linting and formatting.
    Developers should integrate these checks into their local workflow by
    installing pre-commit and running `pre-commit install` to enable the local
    pre-commit hook.
    
    Note that we have removed `tox -e pep8` from the existing test workflow, since
    there's no reason to run the linting as part of the Python version matrix.
    
    [1]: https://pre-commit.com/
    [2]: https://docs.astral.sh/ruff/
    larsks committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    9d56466 View commit details
    Browse the repository at this point in the history
  2. Fix linting and formatting errors reported by pre-commit

    This commit consists of the changes introduced by using ruff to format all
    the source files in the repository and the changes necessary to correct
    any linting errors reported by ruff.
    larsks committed Jul 16, 2024
    Configuration menu
    Copy the full SHA
    b8585c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f2916f4 View commit details
    Browse the repository at this point in the history