Skip to content

Commit 4cf5a2b

Browse files
committed
catch new exceptions thrown when black fails to parse a source file
1 parent 4dae0a8 commit 4cf5a2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyls_black/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def format_document(document, range=None):
3434

3535
try:
3636
formatted_text = format_text(text=text, config=config)
37-
except (ValueError, black.NothingChanged):
37+
except (ValueError, black.NothingChanged, IndentationError, AssertionError):
3838
return []
3939

4040
return [{"range": range, "newText": formatted_text}]

0 commit comments

Comments
 (0)