Skip to content

Commit 04e1310

Browse files
add FAQ entry about undetected syntax errors
This came up in #2644.
1 parent 17e42cb commit 04e1310

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

docs/faq.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ them in the right place, this detection is not and cannot be perfect. Therefore,
9393
sometimes have to manually move these comments to the right place after you format your
9494
codebase with _Black_.
9595

96-
## Can I run black with PyPy?
96+
## Can I run Black with PyPy?
9797

9898
Yes, there is support for PyPy 3.7 and higher. You cannot format Python 2 files under
9999
PyPy, because PyPy's inbuilt ast module does not support this.
100+
101+
## Why does Black not detect syntax errors in my code?
102+
103+
_Black_ is an autoformatter, not a Python linter or interpreter. Detecting all syntax
104+
errors is not a goal. It can format all code accepted by CPython (if you find an example
105+
where that doesn't hold, please report a bug!), but it may also format some code that
106+
CPython doesn't accept.

0 commit comments

Comments
 (0)