Edit: I found that this issue is already logged.
Today we first ran an analysis on Python code that is auto-formatted by Black (https://github.com/ambv/black). In a number of files, Sonarcloud throws a parse error: Unable to parse file: … Parse error at line # …
After looking into the code, we found the following issue with the parsing. If this example function
def do_nothing(*,some_string: str,another_string: str,some_number: int,another_number: int = 8) -> None: pass
is formatted by Black, it comes out as
def do_nothing( *, some_string: str, another_string: str, some_number: int, another_number: int = 8, ) -> None: pass
The parse error is causes by the , after the 8. Note that that , is not necessary (and other auto-formatters do not add it) but it is not wrong either; the code runs perfectly fine with or without that extra , and no linting warnings are generated in either case. So Sonarcloud throws an error on working, pep8-compliant code.