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

MAINT: use ruff format instead of black #7160

Merged
merged 2 commits into from Dec 16, 2023

Conversation

MridulS
Copy link
Member

@MridulS MridulS commented Dec 14, 2023

The ruff formatter is in "production-ready beta" now, and it's supposed to be a 99% drop in replacement for black.

I ran our codebase with the ruff formatter and it makes minimal changes to our black formatted codebase and it's much faster than the black formatter (it still follows the black spec).

We still will depend on blacken-docs for now. They are still finialising support for formatting code inside docstrings (astral-sh/ruff#8908).

Copy link
Contributor

@rossbar rossbar left a comment

Choose a reason for hiding this comment

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

+1 for switching over, thanks @MridulS

I also went ahead and just removed the pylint comments in ismags.py as I don't believe they're relevant with the current linting setup. Feel free to revert c569978 if I'm wrong!

Copy link
Member

@dschult dschult left a comment

Choose a reason for hiding this comment

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

Thanks for this -- it all looks good to me.

@rossbar rossbar merged commit 6ad7842 into networkx:main Dec 16, 2023
39 checks passed
@jarrodmillman jarrodmillman added this to the 3.3 milestone Dec 16, 2023
@cnpryer cnpryer mentioned this pull request Feb 4, 2024
cvanelteren pushed a commit to cvanelteren/networkx that referenced this pull request Apr 22, 2024
* use ruff format instead of black

* Rm pylint comment guards.

---------

Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

4 participants