Skip to content

Conversation

marcelotrevisani
Copy link
Contributor

Should the black version be the same as that is being in use by the black hook?

@@ -8,7 +8,7 @@ repos:
rev: v1.0.0
hooks:
- id: blacken-docs
additional_dependencies: [black==19.3b0]
additional_dependencies: [black==19.10b0]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rev: 19.10b0

@marcelotrevisani marcelotrevisani changed the title Unifying black version Unifying black version in pre-commit config file Jan 7, 2020
@nicoddemus
Copy link
Member

nicoddemus commented Jan 7, 2020

Hi @marcelotrevisani!

Should the black version be the same as that is being in use by the black hook?

What do you mean by "the black version"? IFAIK the pre-commit file it is the only place where we define which version of black we use.

@marcelotrevisani
Copy link
Contributor Author

marcelotrevisani commented Jan 7, 2020

Hi @marcelotrevisani!

Should the black version be the same as that is being in use by the black hook?

What do you mean by "the black version"? IFAIK the pre-commit file it is the only place where we define which version of black we use.

Sorry, I think I was not clear. The pre-commit hook to run black is using the version 19.10 and the blacken-docs is set to use black 19.3. Am I right?
Does it make sense to unify the black versions? I know that they are going to be different envs, I just thought that would be good to run black using the same version.
It's just a very small thing, but you can close it if you think that is unnecessary :)

@hugovk
Copy link
Member

hugovk commented Jan 7, 2020

Yes, makes sense to use the same newer version as here:

https://github.com/marcelotrevisani/pytest/blob/8dbf6a4b2d89b8cbffe53ee39aa98c27fe4714d8/.pre-commit-config.yaml#L3

@nicoddemus
Copy link
Member

@marcelotrevisani thanks for the clarification, that was probably an oversight and we should be using the same version. 😁

@nicoddemus nicoddemus merged commit f46ad8d into pytest-dev:master Jan 7, 2020
@marcelotrevisani marcelotrevisani deleted the patch-1 branch January 7, 2020 12:11
@RonnyPfannschmidt
Copy link
Member

@asottile i wonder if pre-commit could be extended to substitute the rev of other envs inside of extra deps?

@asottile
Copy link
Member

asottile commented Jan 7, 2020

pre-commit currently has no substitution and I don't want to change that

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.

5 participants