Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow picking a specific black version in the github action #1939

Closed
stefanfoulis opened this issue Jan 22, 2021 · 3 comments · Fixed by #1940
Closed

Allow picking a specific black version in the github action #1939

stefanfoulis opened this issue Jan 22, 2021 · 3 comments · Fixed by #1940
Labels
C: integrations Editor plugins and other integrations S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request

Comments

@stefanfoulis
Copy link
Contributor

Sometimes we want to stick with the formatting rules of a specific black version for a little while until we've concluded large PRs to avoid merge conflicts.
The Github action currently does not support picking a specific version of black though.

Suggested solution: Add a parameter for the github action to pick a specific black version.

@stefanfoulis stefanfoulis added the T: enhancement New feature or request label Jan 22, 2021
@JelleZijlstra
Copy link
Collaborator

Sounds good, a PR would be welcome.

@youngmit
Copy link

youngmit commented Apr 26, 2021

I spent some time trying to figure this out, and largely due to my lack of docker experience am kind of hitting a wall. Has anyone looked into this? It seems that this is caused by the fact that the Dockerfile is just doing pip install black, which will fetch whatever is the latest black version on pypi, rather than whatever version is being called out in the GitHub action.

This is pretty surprising as it will cause GH actions to just start failing all of a sudden under the same code base whenever Black changes it's rules. Seems like the action should install whichever version is checked out, rather than whatever the latest happens to be. Like I said, I've been trying on a fork to get this behavior out of the Dockerfile, but to no avail.

@ichard26 ichard26 added the C: integrations Editor plugins and other integrations label Apr 26, 2021
@ichard26
Copy link
Collaborator

@youngmit

There is an open PR fixing this, I have no idea whether it's ready (technically it's still a draft although that might be a holdover from finished development) and I still need to review it: GH-1940.

@ichard26 ichard26 added the S: accepted The changes in this design / enhancement issue have been accepted and can be implemented label Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: integrations Editor plugins and other integrations S: accepted The changes in this design / enhancement issue have been accepted and can be implemented T: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants