Describe the bug
When running black with -t py35 code that raises syntax errors is left unchanged.
To Reproduce:
example.py
def func(
a_long_variable_name: int = 1000000,
another_long_variable_name: int = 1000000,
**kwargs,
):
pass
This example is valid in python 3.7 but not in python 3.5.
- Run Black on it like so:
black --target-version=py35 example.py
- File remains unchanged
Expected behavior
I would expect black to tell me that the trailing comma is a syntax error in the target python version, or remove the trailing comma.
Environment:
- black: 19.10b0
- OS: Docker using python:3.7-buster (Python 3.7.7 (default, May 16 2020, 07:16:36))
Does this bug also happen on master?
Yes
Additional context
Maybe related #419 ?
Describe the bug
When running black with
-t py35code that raises syntax errors is left unchanged.To Reproduce:
example.py
This example is valid in python 3.7 but not in python 3.5.
Expected behavior
I would expect black to tell me that the trailing comma is a syntax error in the target python version, or remove the trailing comma.
Environment:
Does this bug also happen on master?
Yes
Additional context
Maybe related #419 ?