Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upCLN remove unnecessary trailing commas to get ready for new version of black #35925
Labels
Milestone
Comments
This was referenced Aug 27, 2020
|
I think the easiest way to find them is actually to let black (using the latest version) reformat the file(s), and then check in the diff for which ones the trailing comma can be removed (and then run black again) |
|
I am looking at these right now
edit: #35956 @MarcoGorelli if it looks good I can open another with some more later today. |
|
@jpribyl thanks! Yes, feel free to do so, any help here would be appreciated! |
|
with several more files:
|
This was referenced Aug 29, 2020
Closed
JonathanShrek
added a commit
to JonathanShrek/pandas
that referenced
this issue
Aug 30, 2020
JonathanShrek
added a commit
to JonathanShrek/pandas
that referenced
this issue
Aug 30, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new version of
blackis consistent in how it handles the magic trailing commas. So if we upgradeblackand apply it, lots of files will be changed. However, the diff needn't be so large if we remove unnecessary trailing commas before upgrading.E.g. in pandas/core/aggregation.py there is
which has an unnecessary trailing comma.
The new version of
blackwould transform this asHowever, if we instead remove the trailing comma and write it as
then both the current and the new versions of black will be OK with it.
So, PRs to remove some unnecessary trailing commas would be welcome - perhaps keep each PR limited to 5-10 files changed.
Files that (may) need changing are: