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

Github actions: black version mismatch #27

Closed
bwohlberg opened this issue Oct 6, 2021 · 1 comment
Closed

Github actions: black version mismatch #27

bwohlberg opened this issue Oct 6, 2021 · 1 comment
Assignees
Labels
developer Developer environment: issues related to CI, git, etc.

Comments

@bwohlberg
Copy link
Collaborator

I just had a PR fail the lint test, apparently due to a mismatch between black versions being used locally (19.10b0) and on github (presumably 21.9b0, the latest stable release). The local version of black remained at 19.10b0 after a conda update, despite 21.9b0 begin available via conda, presumably due to some dependency conflicts. It would be useful to try to figure out a strategy for avoiding such a situation in the future.

@bwohlberg bwohlberg added the developer Developer environment: issues related to CI, git, etc. label Oct 13, 2021
@Michael-T-McCann
Copy link
Contributor

There are two issue in one here:

  1. Your version of black is older than dev_requirements.txt specifies. Unfortunately, when we update the version of a dependency, everyone needs to update their environment to meet the version requirement. I don't see a way around that, we'll just try not to do it too often.

  2. Because the black dependency was black >= 21.6b0, the CI would end up with the latest version of black. That's not desirable because, e.g., version 22.1 (when/if it appears) and version 21.6 would both meet the requirement but cause lint errors because they (may) format differently. To guard against this, I changed the requirement to black >= 21.6b0, == 21.* in 93c8a8c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer Developer environment: issues related to CI, git, etc.
Projects
None yet
Development

No branches or pull requests

3 participants