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

Improve Emacs configuration #12070

Merged
merged 1 commit into from
Jun 28, 2024
Merged

Improve Emacs configuration #12070

merged 1 commit into from
Jun 28, 2024

Conversation

bersace
Copy link
Contributor

@bersace bersace commented Jun 27, 2024

Replace black and combine ruff check --select=I --fix and ruff format.

Replace black and combine ruff check --fix and ruff format.
@bersace
Copy link
Contributor Author

bersace commented Jun 27, 2024

Copy link
Member

@dhruvmanila dhruvmanila left a comment

Choose a reason for hiding this comment

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

This seems correct as per the linked documentation.

Do you know why does the old configuration not work or is this just a better way to do it? Sorry to ask a basic question but I don't think anyone in the team uses emacs.

@dhruvmanila dhruvmanila added the documentation Improvements or additions to documentation label Jun 28, 2024
@bersace
Copy link
Contributor Author

bersace commented Jun 28, 2024

Do you know why does the old configuration not work or is this just a better way to do it? Sorry to ask a basic question but I don't think anyone in the team uses emacs.

The old configuration works with two limitations:

  • black may still be called, especially if ruff fails.
  • User have to choose whether to format or to sort imports.

The suggested configuration is more efficient, reliable and featureful.

@dhruvmanila
Copy link
Member

Thank you for providing the details. I'll go ahead and merge this. Welcome to Ruff!

@dhruvmanila
Copy link
Member

(I've updated the PR description to reflect that this combines formatting and import sorting.)

@dhruvmanila dhruvmanila merged commit 2336c07 into astral-sh:main Jun 28, 2024
19 checks passed
@bersace bersace deleted the patch-1 branch June 28, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants