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

Wrap expressions in parentheses when negating #10346

Merged
merged 1 commit into from
Mar 11, 2024
Merged

Conversation

charliermarsh
Copy link
Member

Summary

When negating an expression like a or b, we need to wrap it in parentheses, e.g., not (a or b) instead of not a or b, due to operator precedence.

Closes #10335.

Test Plan

cargo test

@charliermarsh charliermarsh added the bug Something isn't working label Mar 11, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@charliermarsh charliermarsh merged commit 02fc521 into main Mar 11, 2024
17 checks passed
@charliermarsh charliermarsh deleted the charlie/parens branch March 11, 2024 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant