This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
forked from pytest-dev/pytest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only use trailing commas in function signatures when it's safe
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 pytest-dev#8
- Loading branch information
Showing
6 changed files
with
101 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
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)}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters