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

[CHIA-1681] Replace black with Ruff #18813

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

Quexington
Copy link
Contributor

@Quexington Quexington commented Nov 4, 2024

See PR #18759 for more information about Ruff. This PR continues the work of simplifying our pre-commit workflow by replacing another one of our tools with Ruff.

Ruff specifically targets black to replace with its formatter since black is so popular in the python ecosystem. There are, however, some differences in opinion and they are all documented here: https://docs.astral.sh/ruff/formatter/black/ . The main one that may be a little controversial is the fact that ruff would rather avoid parentheses than break up call expressions like so:

derivation_record: Optional[
    DerivationRecord
] = await wallet_state_manager.puzzle_store.get_derivation_record_for_puzzle_hash(coin.puzzle_hash)

Copy link

socket-security bot commented Nov 4, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

🚮 Removed packages: pypi/black@24.8.0, pypi/pathspec@0.11.2

View full report↗︎

@Quexington Quexington added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Nov 4, 2024
Base automatically changed from quex.finish_replacing_flake8_with_ruff to main November 4, 2024 16:00
@github-actions github-actions bot added the merge_conflict Branch has conflicts that prevent merge to main label Nov 4, 2024
@github-actions github-actions bot removed the merge_conflict Branch has conflicts that prevent merge to main label Nov 4, 2024
@Chia-Network Chia-Network deleted a comment from github-actions bot Nov 4, 2024
@Chia-Network Chia-Network deleted a comment from github-actions bot Nov 4, 2024
@Quexington Quexington marked this pull request as ready for review November 4, 2024 16:15
@Quexington Quexington requested review from a team as code owners November 4, 2024 16:15
chia/_tests/util/build_network_protocol_files.py Outdated Show resolved Hide resolved
chia/_tests/wallet/test_wallet_coin_store.py Outdated Show resolved Hide resolved
@Quexington Quexington added the ready_to_merge Submitter and reviewers think this is ready label Nov 4, 2024
@Quexington Quexington changed the title Replace black with Ruff [CHIA-1681] Replace black with Ruff Nov 4, 2024
@pmaslana pmaslana merged commit 2808ee2 into main Nov 4, 2024
365 checks passed
@pmaslana pmaslana deleted the quex.replace_black_with_ruff branch November 4, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changed Required label for PR that categorizes merge commit message as "Changed" for changelog ready_to_merge Submitter and reviewers think this is ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants