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

build: format code with ruff format over black #7447

Merged
merged 4 commits into from
Nov 2, 2023

Conversation

deepyaman
Copy link
Contributor

@deepyaman deepyaman commented Oct 26, 2023

Ruff's Python formatter was announced a couple days ago, so why not? We already use Ruff for linting.

I've commented on the changes Ruff made, but they almost all seem positive (except for the lambda formatting, which is a known issue and already has somebody working on it).

Technically, caught a minor CI issue where the "decompiler" extra wasn't getting installed for tests of that functionality. It worked previously because Black was already a dev dependency.

(I intentionally haven't tried replacing the decompiler functionality with ruff format. Not sure if I should? Wanted to check first, since I've never even used the decompile functionality myself.)

@deepyaman deepyaman changed the title style(ruff-format): format code with ruff format build: format code with ruff format over black Oct 27, 2023
@deepyaman deepyaman marked this pull request as ready for review October 27, 2023 01:02
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

LGTM!

.github/workflows/ibis-main.yml Show resolved Hide resolved
ibis/backends/postgres/registry.py Show resolved Hide resolved
justfile Show resolved Hide resolved
@deepyaman deepyaman force-pushed the build/ruff-format branch 2 times, most recently from 2d600b0 to 63152f4 Compare October 27, 2023 14:49
@deepyaman deepyaman force-pushed the build/ruff-format branch 4 times, most recently from 909ebe3 to 3fa18b6 Compare October 30, 2023 14:35
Copy link
Member

@cpcloud cpcloud left a comment

Choose a reason for hiding this comment

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

LGTM! We can leave the black optional dependency now for the decompiler feature and potentially move that over to ruff format later. Alternatively, we can leave people to their own formatters and not format the code at all.

@cpcloud cpcloud added this to the 7.1 milestone Oct 31, 2023
@cpcloud cpcloud added the developer-tools Tools related to ibis development label Oct 31, 2023
@deepyaman
Copy link
Contributor Author

LGTM! We can leave the black optional dependency now for the decompiler feature and potentially move that over to ruff format later. Alternatively, we can leave people to their own formatters and not format the code at all.

Great! Went ahead and rebased on top of latest.

pyproject.toml Outdated Show resolved Hide resolved
@cpcloud cpcloud merged commit 9ec70f7 into ibis-project:master Nov 2, 2023
97 of 100 checks passed
@cpcloud
Copy link
Member

cpcloud commented Nov 2, 2023

Thank you!

@deepyaman deepyaman deleted the build/ruff-format branch November 2, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-tools Tools related to ibis development
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants