| 1 |
def f( |
| 2 |
a, |
| 3 |
**kwargs, |
| 4 |
) -> A: |
| 5 |
with cache_dir(): |
| 6 |
if something: |
| 7 |
result = ( |
| 8 |
CliRunner().invoke(black.main, [str(src1), str(src2), "--diff", "--check"]) |
| 9 |
) |
| 10 |
limited.append(-limited.pop()) # negate top |
| 11 |
return A( |
| 12 |
very_long_argument_name1=very_long_value_for_the_argument, |
| 13 |
very_long_argument_name2=-very.long.value.for_the_argument, |
| 14 |
**kwargs, |
| 15 |
) |
| 16 |
def g(): |
| 17 |
"Docstring." |
| 18 |
def inner(): |
| 19 |
pass |
| 20 |
print("Inner defs should breathe a little.") |
| 21 |
def h(): |
| 22 |
def inner(): |
| 23 |
pass |
| 24 |
print("Inner defs should breathe a little.") |
| 25 |
|
| 26 |
|
| 27 |
if os.name == "posix": |
| 28 |
import termios |
| 29 |
def i_should_be_followed_by_only_one_newline(): |
| 30 |
pass |
| 31 |
elif os.name == "nt": |
| 32 |
try: |
| 33 |
import msvcrt |
| 34 |
def i_should_be_followed_by_only_one_newline(): |
| 35 |
pass |
| 36 |
|
| 37 |
except ImportError: |
| 38 |
|
| 39 |
def i_should_be_followed_by_only_one_newline(): |
| 40 |
pass |
| 41 |
|
| 42 |
elif False: |
| 43 |
|
| 44 |
class IHopeYouAreHavingALovelyDay: |
| 45 |
def __call__(self): |
| 46 |
print("i_should_be_followed_by_only_one_newline") |
| 47 |
else: |
| 48 |
|
| 49 |
def foo(): |
| 50 |
pass |
| 51 |
|
| 52 |
with hmm_but_this_should_get_two_preceding_newlines(): |
| 53 |
pass |
| 54 |
|
| 55 |
# output |
| 56 |
|
| 57 |
def f( |
| 58 |
a, |
| 59 |
**kwargs, |
| 60 |
) -> A: |
| 61 |
with cache_dir(): |
| 62 |
if something: |
| 63 |
result = CliRunner().invoke( |
| 64 |
black.main, [str(src1), str(src2), "--diff", "--check"] |
| 65 |
) |
| 66 |
limited.append(-limited.pop()) # negate top |
| 67 |
return A( |
| 68 |
very_long_argument_name1=very_long_value_for_the_argument, |
| 69 |
very_long_argument_name2=-very.long.value.for_the_argument, |
| 70 |
**kwargs, |
| 71 |
) |
| 72 |
|
| 73 |
|
| 74 |
def g(): |
| 75 |
"Docstring." |
| 76 |
|
| 77 |
def inner(): |
| 78 |
pass |
| 79 |
|
| 80 |
print("Inner defs should breathe a little.") |
| 81 |
|
| 82 |
|
| 83 |
def h(): |
| 84 |
def inner(): |
| 85 |
pass |
| 86 |
|
| 87 |
print("Inner defs should breathe a little.") |
| 88 |
|
| 89 |
|
| 90 |
if os.name == "posix": |
| 91 |
import termios |
| 92 |
|
| 93 |
def i_should_be_followed_by_only_one_newline(): |
| 94 |
pass |
| 95 |
|
| 96 |
elif os.name == "nt": |
| 97 |
try: |
| 98 |
import msvcrt |
| 99 |
|
| 100 |
def i_should_be_followed_by_only_one_newline(): |
| 101 |
pass |
| 102 |
|
| 103 |
except ImportError: |
| 104 |
|
| 105 |
def i_should_be_followed_by_only_one_newline(): |
| 106 |
pass |
| 107 |
|
| 108 |
elif False: |
| 109 |
|
| 110 |
class IHopeYouAreHavingALovelyDay: |
| 111 |
def __call__(self): |
| 112 |
print("i_should_be_followed_by_only_one_newline") |
| 113 |
|
| 114 |
else: |
| 115 |
|
| 116 |
def foo(): |
| 117 |
pass |
| 118 |
|
| 119 |
|
| 120 |
with hmm_but_this_should_get_two_preceding_newlines(): |
| 121 |
pass |