X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/dc8cdda8fdd6941103240ae3279034d2acdc69bc..389e9c23a9e622ee6090d902cc5f56c5f76cdee9:/src/black/parsing.py?ds=inline diff --git a/src/black/parsing.py b/src/black/parsing.py index 2fd41f0..c101643 100644 --- a/src/black/parsing.py +++ b/src/black/parsing.py @@ -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