-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
STY: Bump ruff; use ruff's docstring/code formatting #56554
Conversation
MSG='Partially validate docstrings (EX03)' ; echo $MSG | ||
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=EX03 --ignore_functions \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are you sure we can remove this? this checks for flake8 errors within docstrings, but it depends on the docstrings having been built in the first place using the fancy @doc
decorator, which ruff format
doesn't check
@@ -368,6 +349,10 @@ exclude = [ | |||
# Keep this one enabled | |||
"pandas/_typing.py" = ["TCH"] | |||
|
|||
[tool.ruff.format] | |||
docstring-code-format = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I like to replace as much with ruff as possible :) but it might be faster to have one PR to replace black and a second one for the doc formatting (I believe black isn't used for that?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Opened up #56704 to just replace black
Looks like ruff now has the ability to replace black and format docstring examples too.
Appears there are some formatting differences but they appear minor IMO and at least the format requires no manual adjusting