Skip to content

Commit

Permalink
Merge 28d2f32 into 9bd4134
Browse files Browse the repository at this point in the history
  • Loading branch information
emfdavid committed Jan 20, 2022
2 parents 9bd4134 + 28d2f32 commit 9b0487d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,9 @@ def assert_equivalent(src: str, dst: str, *, pass_num: int = 1) -> None:
src_ast = parse_ast(src)
except Exception as exc:
raise AssertionError(
f"cannot use --safe with this file; failed to parse source file: {exc}"
f"cannot use --safe with this file; failed to parse source file AST: {exc}\n"
f"This could be caused by running black with an older python version "
f"that does not support new syntax used in your source file."
) from exc

try:
Expand Down

0 comments on commit 9b0487d

Please sign in to comment.