-
Notifications
You must be signed in to change notification settings - Fork 55
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
The repo for black has changed locations #270
Comments
Since we provide the |
The solution looks to be a little different to that proposed. The warning comes from the So, as indicated there and adopted by a number of other projects, I'm going to pin |
For future reference, the |
However you want to fix this is fine with me; I only meant to bring the issue to your attention and explain how I had resolved it. Do you want me to test something on this end, to make sure it works in the environment that originally had the problem? |
I've pushed PR #271 which has you requested as a reviewer ;) As it happens, changing the GitHub URL to point to The change of URL has no effect as there's an automatic redirection from |
This is not entirely true. Perhaps it depends on something in the configuration, but I got the same error 10 different times—every time I tried submitting my commit—and it was actively preventing me from committing. I tried several things to fix it. The only thing that led to the error no longer being raised was changing |
Changing the URL does not affect the warning, except to complain about the updated URL. $ git status
On branch test_270
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .pre-commit-config.yaml
[...]
$ head .pre-commit-config.yaml
repos:
- repo: https://github.com/ambv/black
rev: stable
hooks:
- id: black
language_version: python3
[...]
$ git add .pre-commit-config.yaml
$ git commit
[WARNING] The 'rev' field of repo 'https://github.com/ambv/black' appears to be a mutable reference (moving tag / branch). Mutable references are never updated after first install and are not supported. See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details. Hint: `pre-commit autoupdate` often fixes this.
[...]
$ head .pre-commit-config.yaml
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3
[...]
$ git add .pre-commit-config.yaml
$ git commit
[WARNING] The 'rev' field of repo 'https://github.com/psf/black' appears to be a mutable reference (moving tag / branch). Mutable references are never updated after first install and are not supported. See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details. Hint: `pre-commit autoupdate` often fixes this. Pinning the $ head .pre-commit-config.yaml
repos:
- repo: https://github.com/psf/black
rev: 21.5b1
hooks:
- id: black
language_version: python3
[...]
$ git add .pre-commit-config.yaml
$ git commit
black................................................(no files to check)Skipped
blacken-docs.........................................(no files to check)Skipped |
Well, it changes whether I get the warning in Atom, and whether I can commit from within the editor itself. I don't how, or if, that makes sense. |
Fixes Issue #270 by pinning `black` revision in `pre-commit` config. Also pins other application versions.
Summary:
The
.pre-commit-config.yaml
file contains an old URL for black. This did not cause a problem for me when running black from the command line, but when attempting to commit from within atom, I got this error:[WARNING] The 'rev' field of repo 'https://github.com/ambv/black' appears to be a mutable reference (moving tag / branch). Mutable references are never updated after first install and are not supported. See https://pre-commit.com/#using-the-latest-version-for-a-repository for more details.
Changing the URL in the pre-commit file from
https://github.com/ambv/black
tohttps://github.com/psf/black
(which the former now redirects to) resolved the problem. — I have done this only for the
fastANI
branch, so far.Reproducible Steps:
I'm unclear if this issue is likely to be common, or if it relies upon my specific setup.
Python Version:
I think atom is running 3.8.
Operating System:
MacOS 10.13.6
The text was updated successfully, but these errors were encountered: