Format if statements (#4961)

This commit is contained in:
Micha Reiser 2023-06-09 10:55:14 +02:00 committed by GitHub
parent 548a3cbb3f
commit 1accbeffd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 882 additions and 357 deletions

View file

@ -248,7 +248,8 @@ if True:
# trailing
"#;
let expected = r#"# preceding
NOT_YET_IMPLEMENTED_StmtIf
if True:
NOT_IMPLEMENTED_call()
# trailing
"#;
let actual = format_module(input)?.as_code().to_string();
@ -436,6 +437,11 @@ def with_leading_comment(): ...
// .document()
// .display(formatted.context().source_code()));
// dbg!(formatted
// .context()
// .comments()
// .debug(formatted.context().source_code()));
let printed = formatted.print().unwrap();
assert_eq!(