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

build: replace Flake8, FlakeHeaven and isort with ruff #2548

Merged
merged 1 commit into from
Aug 29, 2023

Conversation

aucampia
Copy link
Member

Summary of changes

FlakeHeaven only supports Flake8 versions below 5.x, and flake8 itself is still fairly limited in its configurability.

Ruff implements most of the features of isort, Flake8 and FlakeHeaven. It does not provide a baseline feature like FlakeHeaven, but it does have a feature for adding # noqa: directives to the code base, which was used after file specific ignores were configured for some errors.

Ruff also has a fix feature which can be used to fix some errors, so this change also adds Ruff to the pre-commit config so that it can be triggered with pre-commit.ci autofix.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Checked that all tests and type checking passes.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia aucampia requested a review from a team August 27, 2023 19:08
@aucampia aucampia marked this pull request as ready for review August 27, 2023 19:16
@aucampia
Copy link
Member Author

Compact diff can be found here: https://gist.github.com/aucampia/abe1c139c52fb9c2f164f5332155634d

@aucampia aucampia added review wanted This indicates that the PR is ready for review ready to merge The PR will be merged soon if no further feedback is provided. labels Aug 27, 2023
@aucampia
Copy link
Member Author

The changes in RDFLib are:

  • Addition of # noqa: directives
  • Reformatting from black

@coveralls
Copy link

coveralls commented Aug 27, 2023

Coverage Status

coverage: 90.935%. remained the same when pulling 33b35d0 on aucampia:aucampia/20230827T1011-flake8 into 079f388 on RDFLib:main.

@aucampia
Copy link
Member Author

@RDFLib/core pinging everyone in case anyone has any concerns about this.

FlakeHeaven only supports Flake8 versions below 5.x, and flake8 itself
is still fairly limited in its configurability.

Ruff implements most of the features of isort, Flake8 and FlakeHeaven.
It does not provide a baseline feature like FlakeHeaven, but it does
have a feature for adding `# noqa:` directives to the code base, which
was used after file specific ignores were configured for some errors.

Ruff also has a fix feature which can be used to fix some errors, so
this change also adds Ruff to the pre-commit config so that it can be
triggered with `pre-commit.ci autofix`.
@aucampia aucampia force-pushed the aucampia/20230827T1011-flake8 branch from 830a359 to 33b35d0 Compare August 28, 2023 16:36
@aucampia
Copy link
Member Author

I'm going to merge this tomorrow to prevent the need for excessive rebasing, and because I also want to start fixing some of the issues.

@aucampia aucampia merged commit dfe0c21 into RDFLib:main Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge The PR will be merged soon if no further feedback is provided. review wanted This indicates that the PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants