|
72 | 72 | zzz, |
73 | 73 | ) |
74 | 74 |
|
| 75 | +inline_comments_func1( |
| 76 | + "if there are inline " |
| 77 | + "comments in the middle " |
| 78 | + # Here is the standard alone comment. |
| 79 | + "of the implicitly concatenated " |
| 80 | + "string, we should handle " |
| 81 | + "them correctly", |
| 82 | + xxx, |
| 83 | +) |
| 84 | + |
| 85 | +inline_comments_func2( |
| 86 | + "what if the string is very very very very very very very very very very long and this part does " |
| 87 | + "not fit into a single line? " |
| 88 | + # Here is the standard alone comment. |
| 89 | + "then the string should still be properly handled by merging and splitting " |
| 90 | + "it into parts that fit in line length.", |
| 91 | + xxx, |
| 92 | +) |
| 93 | + |
75 | 94 | raw_string = r"This is a long raw string. When re-formatting this string, black needs to make sure it prepends the 'r' onto the new string." |
76 | 95 |
|
77 | 96 | fmt_string1 = "We also need to be sure to preserve any and all {} which may or may not be attached to the string in question.".format("method calls") |
@@ -395,6 +414,22 @@ def foo(): |
395 | 414 | zzz, |
396 | 415 | ) |
397 | 416 |
|
| 417 | +inline_comments_func1( |
| 418 | + "if there are inline comments in the middle " |
| 419 | + # Here is the standard alone comment. |
| 420 | + "of the implicitly concatenated string, we should handle them correctly", |
| 421 | + xxx, |
| 422 | +) |
| 423 | + |
| 424 | +inline_comments_func2( |
| 425 | + "what if the string is very very very very very very very very very very long and" |
| 426 | + " this part does not fit into a single line? " |
| 427 | + # Here is the standard alone comment. |
| 428 | + "then the string should still be properly handled by merging and splitting " |
| 429 | + "it into parts that fit in line length.", |
| 430 | + xxx, |
| 431 | +) |
| 432 | + |
398 | 433 | raw_string = ( |
399 | 434 | r"This is a long raw string. When re-formatting this string, black needs to make" |
400 | 435 | r" sure it prepends the 'r' onto the new string." |
|
0 commit comments