mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-21 12:05:10 +00:00
Format UnaryExpr
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary This PR adds basic formatting for unary expressions. <!-- What's the purpose of the change? What does it do, and why? --> ## Test Plan I added a new `unary.py` with custom test cases
This commit is contained in:
parent
3973836420
commit
1336ca601b
13 changed files with 623 additions and 115 deletions
|
@ -411,11 +411,10 @@ Formatted twice:
|
|||
#[test]
|
||||
fn quick_test() {
|
||||
let src = r#"
|
||||
|
||||
def foo(
|
||||
b=3
|
||||
+ 2 # comment
|
||||
):
|
||||
if [
|
||||
aaaaaa,
|
||||
BBBB,ccccccccc,ddddddd,eeeeeeeeee,ffffff
|
||||
] & bbbbbbbbbbbbbbbbbbddddddddddddddddddddddddddddbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb:
|
||||
...
|
||||
"#;
|
||||
// Tokenize once
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue