-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Trailing comma after **kwargs not removed when targeting py35 #1463
Copy link
Copy link
Closed
Labels
T: bugSomething isn't workingSomething isn't working
Description
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,
):
passThis 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 ?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T: bugSomething isn't workingSomething isn't working