Skip to content

Commit

Permalink
Merge pull request #142 from JelleZijlstra/patch-1
Browse files Browse the repository at this point in the history
Fix target_versions for FileMode
  • Loading branch information
asottile authored Jan 30, 2022
2 parents fb39015 + e49b3a4 commit 13141c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blacken_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def main(argv: Sequence[str] | None = None) -> int:
args = parser.parse_args(argv)

black_mode = black.FileMode(
target_versions=args.target_versions,
target_versions=set(args.target_versions),
line_length=args.line_length,
string_normalization=not args.skip_string_normalization,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/blacken_docs_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def test_integration_multiple_target_version(tmpdir):
)
assert not blacken_docs.main((str(f),))
assert not blacken_docs.main(
('--target-version', 'py27', '--target-version', 'py36', str(f)),
('--target-version', 'py35', '--target-version', 'py36', str(f)),
)


Expand Down

0 comments on commit 13141c4

Please sign in to comment.