-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow collapsed-ellipsis bodies in other statements (#8499)
## Summary Black and Ruff's preview styles now collapse statements like: ```python 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.
- Loading branch information
1 parent
4170ef0
commit 8c146bb
Showing
3 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,3 +69,5 @@ class Foo: | |
#: E701:2:3 | ||
a = \ | ||
5; | ||
#: | ||
with x(y) as z: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters