
Trailing commas after * or ** in a function signature are only safe for Python 3.6 code. So now Black checks whether the file was already Python 3.6 to begin with. If so, trailing commas are used in such cases. Otherwise, they're not. When * and ** don't appear in a function signature, the trailing comma is always safe. Fixes #8
6 lines
230 B
Python
6 lines
230 B
Python
f'f-string without formatted values is just a string'
|
|
f'{{NOT a formatted value}}'
|
|
f'some f-string with {a} {few():.2f} {formatted.values!r}'
|
|
f"{f'{nested} inner'} outer"
|
|
f'space between opening braces: { {a for a in (1, 2, 3)}}'
|