Skip to content

pre-commit autoupdate wrongly picks pre-releases like 1.2.3a0 #995

@ssbarnea

Description

@ssbarnea

The semantic versioning spec from https://www.python.org/dev/peps/pep-0440/ documents versions like 1.2.3a0 as pre-releases and by default tools should not pick them unless the user explicitly wanted them.

A good example is pip which will never install pre-releases unless user is adding the --pre parameter.

I discovered that pre-commit autoupdate did pick ansible-lint prereleases which is clearly not something users may expect. I seen this happening on at least two other hooks and based on git tag inspection, I could say that there was nothing wrong weird on how the tags were added.

I think that, by default, pre-commit should skip non release suffixes like a, dev, b, rc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions