Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding test case for black preview setting
Functionality added in pull request #48, test case suggested by @ferdynice
- Loading branch information
Showing
4 changed files
with
16 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
"""Example showing future black string reformatting.""" | ||
|
||
|
||
def hello(): | ||
"""Print variations on 'Hello World'.""" | ||
# black v22.1.0 (first stable release) does not edit string literals, | ||
# so the following is untouched unless enable preview mode: | ||
print("hello " "world") # noqa: ISC001 | ||
|
||
|
||
hello() |
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 @@ | ||
test_changes/black_preview.py:8:18: BLK100 Black would make changes. |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[tool.black] | ||
skip-string-normalization = true | ||
skip-magic-trailing-comma = true | ||
preview = true |