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

Allow collapsed-ellipsis bodies in other statements #8499

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Conversation

charliermarsh
Copy link
Member

Summary

Black and Ruff's preview styles now collapse statements like:

from contextlib import nullcontext

ctx = nullcontext()
with ctx: ...

Historically, we made an exception here for classes (#2837). This PR extends it to other statement kinds for consistency with the formatter.

Closes #8496.

@charliermarsh charliermarsh added the bug Something isn't working label Nov 6, 2023
@charliermarsh charliermarsh merged commit 8c146bb into main Nov 6, 2023
16 checks passed
@charliermarsh charliermarsh deleted the charlie/E701 branch November 6, 2023 00:42
Copy link
Contributor

github-actions bot commented Nov 6, 2023

ruff-ecosystem results

Linter (stable)

ℹ️ ecosystem check detected linter changes. (+0 -9 violations, +0 -0 fixes in 41 projects)

latchbio/latch (+0 -9 violations, +0 -0 fixes)

- latch_cli/docker_utils/__init__.py:251:29: E701 Multiple statements on one line (colon)
- latch_cli/menus.py:298:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:226:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:319:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:455:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:516:29: E701 Multiple statements on one line (colon)
- latch_cli/services/local_dev_old.py:314:34: E701 Multiple statements on one line (colon)
- latch_cli/services/preview.py:179:29: E701 Multiple statements on one line (colon)
- latch_cli/utils/__init__.py:203:29: E701 Multiple statements on one line (colon)

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
E701 9 0 9 0 0

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+0 -9 violations, +0 -0 fixes in 41 projects)

latchbio/latch (+0 -9 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

- latch_cli/docker_utils/__init__.py:251:29: E701 Multiple statements on one line (colon)
- latch_cli/menus.py:298:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:226:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:319:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:455:29: E701 Multiple statements on one line (colon)
- latch_cli/services/get_executions.py:516:29: E701 Multiple statements on one line (colon)
- latch_cli/services/local_dev_old.py:314:34: E701 Multiple statements on one line (colon)
- latch_cli/services/preview.py:179:29: E701 Multiple statements on one line (colon)
- latch_cli/utils/__init__.py:203:29: E701 Multiple statements on one line (colon)

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
E701 9 0 9 0 0

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