The pre-commit autoupdate ignores `default_language_version` when `autoupdate`
See original GitHub issuesearch you tried in the issue tracker
default_language_version autoupdate
describe your issue
I got pre-commit.ci autoupdate PR in which falke8 is updated to 6.0.0 even if default_language_version
is specified to python 3.7.
https://github.com/Czaki/nme/pull/20#issue-1467321781
In the pre-commit.ci repository, I found information that they use a plain pre-commit autoupdate
call.
Maybe important information is that flake8 6.0.0 specify a minimum version to 3.8.1
pre-commit --version
same as pre-commit.ci
.pre-commit-config.yaml
default_language_version:
python: python3.7
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
pass_filenames: true
- repo: https://github.com/PyCQA/autoflake
rev: 'v1.7.7' # Use the revision sha / tag you want to point at
hooks:
- id: autoflake
args: ["--remove-all-unused-imports", "-i"]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
pass_filenames: true
# this seems to need to be here in addition to setup.cfg
exclude: vendored|__init__.py|examples
additional_dependencies:
- flake8-tidy-imports
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-json
- id: check-yaml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: .*\.md
- id: debug-statements
- id: mixed-line-ending
- repo: https://github.com/asottile/pyupgrade
rev: v3.2.2
hooks:
- id: pyupgrade
args: ["--py37-plus"]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
- repo: https://github.com/PyCQA/isort
rev: '5.10.1' # Use the revision sha / tag you want to point at
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.991' # Use the sha / tag you want to point at
hooks:
- id: mypy
~/.cache/pre-commit/pre-commit.log (if present)
No response
Issue Analytics
- State:
- Created 10 months ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
ignore autoupdate for specific hook/s · Issue #1959
If pre-commit provide option to ignore autoupdate for specific hook just like pinning version then it will give freedom to users. It's just...
Read more >pre-commit
You can update your hooks to the latest version automatically by running pre-commit autoupdate . By default, this will bring the hooks to...
Read more >Tool Your Django Project: Pre-Commit Hooks
In the “default_language_version” section you can pre-define the default version for each supported language used in the repo. You should set ...
Read more >pre-commit-config.yaml - platform/external/python/pybind11
pre-commit install # (runs every time you commit in git) ... pre-commit autoupdate ... By default, this ignores pyi files, though black supports...
Read more >Automatically format and lint code with pre-commit - Interrupt
This article provides some background and guidelines for using pre-commit to automatically format and lint C-language firmware codebases.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
if you don’t want
autoupdate
then don’t runautoupdate
my problem was solved just a few days after this issue: https://medium.com/google-colab/colab-updated-to-python-3-8-4922f9970a72