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

Ruff formatter #46

Merged
merged 13 commits into from
Nov 13, 2023
Merged

Ruff formatter #46

merged 13 commits into from
Nov 13, 2023

Conversation

Kilo59
Copy link
Member

@Kilo59 Kilo59 commented Oct 24, 2023

Adopt the ruff formatter and drop black

https://astral.sh/blog/the-ruff-formatter

@Kilo59 Kilo59 self-assigned this Oct 24, 2023
@gx-cla-bot
Copy link

gx-cla-bot bot commented Oct 24, 2023

A new contributor, HUZZAH! Welcome and thanks for joining our community. In order to accept a pull request we require that all contributors sign our Contributor License Agreement. We have two different CLAs, depending on whether you are contributing to GX in a personal or professional capacity. Please sign the one that is applicable to your situation so that we may accept your contribution:

Individual Contributor License Agreement v1.0
Software Grant and Corporate Contributor License Agreement v1.0

Once you have signed the CLA, you can add a comment with the text @cla-bot check and the bot will update the PR status!

Please reach out to the #gx-community-support channel, on our Slack if you have any questions or if you have already signed the CLA and are receiving this message in error.

Users missing a CLA: pre-commit-ci[bot]

Copy link
Collaborator

@wookasz wookasz left a comment

Choose a reason for hiding this comment

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

Let's figure out which tools we'd like to use, and use them uniformly across our repositories to avoid cognitive overhead.

@Kilo59
Copy link
Member Author

Kilo59 commented Oct 24, 2023

@wookasz
I'm proposing that we switch to using ruff format uniformly.
Assuming no one objects and nothing unexpected pops up in the attempt to adopt it here.
Do you have a specific objection to switching to the ruff formatter?

Developers will likely not even notice the difference.

  1. If developers have the pre-commit hooks installed the formatting is applied automatically when committing code.
  2. If developers are using invoke fmt the only difference is invoke calls ruff format instead of black
  3. If developers don't use either and misformat something the pre-commit CI will push a fix to the branch automatically.

AFAIK the only case where a developer workflow would change is if they are manually running black from the terminal after every change.

@Kilo59 Kilo59 enabled auto-merge (squash) November 13, 2023 21:32
@@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand.
Copy link
Member Author

Choose a reason for hiding this comment

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

Using a new version of poetry here.

@Kilo59 Kilo59 merged commit a422f1c into main Nov 13, 2023
11 checks passed
@Kilo59 Kilo59 deleted the ruff-formatter branch November 13, 2023 21:33
rreinoldsc added a commit that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants