Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

add warning for deprecated stages values indefault_stages#3313

Merged
asottile merged 1 commit intomainfrom
default-stages-warning
Oct 1, 2024
Merged

add warning for deprecated stages values indefault_stages#3313
asottile merged 1 commit intomainfrom
default-stages-warning

Conversation

@asottile
Copy link
Member

No description provided.

@asottileasottile merged commit05e365f intomainOct 1, 2024
@asottileasottile deleted the default-stages-warning branchOctober 1, 2024 00:02
@DimitriPapadopoulos

I get this warning inCI:

top-level default_stages uses deprecated stage names (commit, push) which will be removed in a future version.  run: `pre-commit migrate-config` to automatically fix this.
Screen capture of pre-commit.ci

default_stages

Yet runningpre-commit migrate-config in my repository doesn't have any effect:

$pre-commit migrate-configConfiguration is already migrated.$

@asottile
Copy link
MemberAuthor

I get this warning inCI:

top-level default_stages uses deprecated stage names (commit, push) which will be removed in a future version.  run: `pre-commit migrate-config` to automatically fix this.

Screen capture of pre-commit.ci
Yet runningpre-commit migrate-config in my repository doesn't have any effect:

$ pre-commit migrate-configConfiguration is already migrated.$

obviously you're not using a new enough pre-commit version

@DimitriPapadopoulos
Copy link

DimitriPapadopoulos commentedOct 14, 2024
edited
Loading

$pre-commit --versionpre-commit 4.0.1$

Couldpre-commit.ci be using newer code than the latest released version ofpre-commit?

@asottile
Copy link
MemberAuthor

show your configuration?

@DimitriPapadopoulos

https://github.com/zarr-developers/numcodecs/blob/8edd3f96d2703df070f70bd224b3707ec4d68c4e/.pre-commit-config.yaml

The part that needs to be updated is:

default_stages:[commit, push]

@asottile
Copy link
MemberAuthor

works for me

$pre-commit migrate-configConfiguration has been migrated.$git diffdiff --git a/.pre-commit-config.yaml b/.pre-commit-config.yamlindex dd04f38..2835f59 100644--- a/.pre-commit-config.yaml+++ b/.pre-commit-config.yaml@@ -3,7 +3,7 @@ ci:   autoupdate_commit_msg: "chore: update pre-commit hooks"   autofix_commit_msg: "style: pre-commit fixes"   autofix_prs: false-default_stages: [commit, push]+default_stages: [pre-commit, pre-push] default_language_version:   python: python3 repos:

@DimitriPapadopoulos
Copy link

DimitriPapadopoulos commentedOct 14, 2024
edited
Loading

It works on my home computer.
$grep default_stages .pre-commit-config.yamldefault_stages: [commit, push]$ $pipx install pre-commit  installed package pre-commit 4.0.1, installed using Python 3.10.12  These apps are now globally available    - pre-commitdone! ✨ 🌟 ✨$ $pre-commit --versionpre-commit 4.0.1$ $pre-commit migrate-configConfiguration has been migrated.$ $grep default_stages .pre-commit-config.yamldefault_stages: [pre-commit, pre-push]$

I'll retry on my computer at work tomorrow, and let you know. Either I did something wrong, or this an effect of a Linux kernel or system issue that breaks my workstation in very strange ways since it was upgraded from Ubuntu 22.04 to Ubuntu 24.04.

@asottile
Copy link
MemberAuthor

almost certainly it was an old version of pre-commit

@DimitriPapadopoulos

I don't think it is an old version (pre-commit installed with pipx just like at home). Rather, my workstation is plagued by mysterious I/O problems since the Ubuntu 24.04 upgrade, see for exampleprefix-dev/rattler-build#1045 (comment).

@asottile
Copy link
MemberAuthor

I don't necessarily trust pipx to do what you want personally

@DimitriPapadopoulos

My workstation has been reinstalled by IT. I cannot reproduce the issue any more. Sorry about the noise.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@asottile@DimitriPapadopoulos

[8]ページ先頭

©2009-2026 Movatter.jp