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

Replace flake8 with Ruff #12621

Merged
merged 6 commits into from
Sep 21, 2023
Merged

Conversation

ogajduse
Copy link
Member

This patch replaces flake8 with Ruff that is 10-100x faster than flake8. It enables only a few rule sets that were enabled by pyflakes already.

Other rules will be added in future PRs.

@ogajduse ogajduse added CherryPick PR needs CherryPick to previous branches 6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 labels Sep 14, 2023
@ogajduse ogajduse self-assigned this Sep 14, 2023
@ogajduse ogajduse requested review from a team as code owners September 14, 2023 09:29
@ogajduse ogajduse requested a review from jyejare September 14, 2023 09:29
@ogajduse ogajduse added the AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing label Sep 14, 2023


[tool.ruff.flake8-quotes]
inline-quotes = "single"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe one day....

Comment on lines 10 to 14
hooks:
- id: trailing-whitespace
exclude: tests/foreman/data/
- id: end-of-file-fixer
- id: check-yaml
- id: debug-statements
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also run pre-commit autoupdate; pre-commit run -a to update the available pre-commit hooks and code changes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to do it in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#12650 created

.pre-commit-config.yaml Show resolved Hide resolved
robottelo/constants/__init__.py Show resolved Hide resolved
@JacobCallahan JacobCallahan merged commit 187cca1 into SatelliteQE:master Sep 21, 2023
5 checks passed
github-actions bot pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
github-actions bot pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
github-actions bot pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
@ogajduse ogajduse deleted the feat/introduce-ruff branch September 21, 2023 14:18
JacobCallahan pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
JacobCallahan pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
JacobCallahan pushed a commit that referenced this pull request Sep 21, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)

(cherry picked from commit 187cca1)
ColeHiggins2 pushed a commit to ColeHiggins2/robottelo that referenced this pull request Oct 9, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)
damoore044 pushed a commit to damoore044/robottelo that referenced this pull request Oct 10, 2023
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)
shweta83 pushed a commit to shweta83/robottelo that referenced this pull request Apr 10, 2024
* Replace flake8 with Ruff

* Replace flake8 with Ruff

* Fix UP038 - non-pep604-isinstance

* Fix F401 - remove unused imports

* Fix F601 - Remove repeated dictionary key

* Fix not-in-test (E713)
@ogajduse ogajduse mentioned this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.12.z Introduced in or relating directly to Satellite 6.12 6.13.z Introduced in or relating directly to Satellite 6.13 6.14.z Introduced in or relating directly to Satellite 6.14 AutoMerge_Cherry_Picked The cherrypicked PRs of master PR would be automerged if all checks passing CherryPick PR needs CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants