Skip to content

pre-commit: black: --target-version py35#6872

Merged
blueyed merged 2 commits intopytest-dev:masterfrom
blueyed:black-py35
Mar 8, 2020
Merged

pre-commit: black: --target-version py35#6872
blueyed merged 2 commits intopytest-dev:masterfrom
blueyed:black-py35

Conversation

@blueyed
Copy link
Contributor

@blueyed blueyed commented Mar 7, 2020

This is meant to avoid having trailing commas after **kwargs, which
only works in Python 3.5.2+.

Ref: 2e756d698, #5611

Might make more sense to add config for it: blueyed#275

@blueyed blueyed changed the title pre-commit: black: --target-version, 3.5 pre-commit: black: --target-version py35 Mar 7, 2020
@blueyed
Copy link
Contributor Author

blueyed commented Mar 7, 2020

What about using a config instead?

Might make more sense to add config for it: blueyed#275

@blueyed
Copy link
Contributor Author

blueyed commented Mar 7, 2020

I assume this will make it work better out of pre-commit also.

But likely I was just being "tricked" by having added trailing commas myself, and then black does not remove them (I guess).

@bluetech
Copy link
Member

bluetech commented Mar 7, 2020

Config file would be better, this way editors will be able to catch it as well.

@blueyed blueyed merged commit db92cea into pytest-dev:master Mar 8, 2020
@blueyed blueyed deleted the black-py35 branch March 8, 2020 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants