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

refactor(tooling): Switch to ruff-format for formatting. #1169

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

elenakrittik
Copy link
Contributor

@elenakrittik elenakrittik commented Mar 19, 2024

Summary

Replaces black with ruff-format.

Depends on #1168

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running pdm lint
    • I have type-checked the code by running pdm pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@shiftinv shiftinv added t: meta Changes to the project itself (CI, configs, etc.) t: refactor/typing/lint Refactors, typing changes and/or linting changes labels Mar 19, 2024
@elenakrittik elenakrittik marked this pull request as ready for review March 19, 2024 16:36
@elenakrittik elenakrittik force-pushed the refactor/replace-black branch 2 times, most recently from 93d0a37 to aa96ddf Compare May 14, 2024 12:59
@elenakrittik
Copy link
Contributor Author

Ready for consideration!

Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

I think I voiced my concerns about all-in-one tooling on discord before; to summarize, not being able to update linter and formatter separately anymore isn't ideal.
If one wants to update ruff to fix a linter bug, but doesn't want the formatting changes a newer version would potentially bring, you're pretty much out of luck.

Still, I'm willing to give this a try, especially given the pretty substantial performance difference. :>
There's potential for lots of fun merge conflicts in other PRs here, so I'd prefer only merging this after the next release - hope that's understandable

disnake/ext/commands/params.py Outdated Show resolved Hide resolved
disnake/types/activity.py Outdated Show resolved Hide resolved
@elenakrittik
Copy link
Contributor Author

I think I voiced my concerns about all-in-one tooling on discord before; to summarize, not being able to update linter and formatter separately anymore isn't ideal.

Don't see much of an issue with that, but given that

I'd prefer only merging this after the next release

We'll have a chance to test it 😄

Copy link
Contributor

@Enegg Enegg left a comment

Choose a reason for hiding this comment

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

165ab84 Undo the formatting changes too

@elenakrittik
Copy link
Contributor Author

165ab84 Undo the formatting changes too

Excuse me, why?

@Enegg
Copy link
Contributor

Enegg commented May 19, 2024

Excuse me, why?

What's the point of fmt: off if the thing it was guarding from being formatted, has been formatted?
https://github.com/DisnakeDev/disnake/pull/1169/files#diff-6377fad5f75948c1eaa880c932839dd3f47b01c21056433ada31632cb518a665R480-R499

@shiftinv shiftinv added this to the disnake v2.11 milestone May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news t: meta Changes to the project itself (CI, configs, etc.) t: refactor/typing/lint Refactors, typing changes and/or linting changes
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants