Skip to content

Commit

Permalink
Merge branch 'main' into perf-patma-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ichard26 committed Dec 5, 2021
2 parents 7b89fbb + d9eee31 commit 247c55f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/black/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def matches_grammar(src_txt: str, grammar: Grammar) -> bool:
drv = driver.Driver(grammar)
try:
drv.parse_string(src_txt, True)
except ParseError:
except (ParseError, TokenError, IndentationError):
return False
else:
return True
Expand Down

0 comments on commit 247c55f

Please sign in to comment.