Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Report error when report minor and patch version is extract zero  #10

@gassyfeve

Description

@gassyfeve

Version: 2.0.4

fmt: commands[0]> pyproject-fmt --check pyproject.toml
thread '<unnamed>' panicked at rust/src/helpers/pep508.rs:85:44:
called `Result::unwrap()` on an `Err` value: Pep508Error { message: String("The ~= operator requires at least two segments in the release version"), start: 25, len: 3, input: "azure-mgmt-costmanagement~=3" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "/home/gitlab-runner/builds/cQMsr2pj/0/lico/lico/core/apps/cloudscheduling/.tox/fmt/bin/pyproject-fmt", line 8, in <module>
    sys.exit(run())
  File "/home/gitlab-runner/builds/cQMsr2pj/0/lico/lico/core/apps/cloudscheduling/.tox/fmt/lib/python3.9/site-packages/pyproject_fmt/__main__.py", line 71, in run
    results = [_handle_one(config) for config in configs]
  File "/home/gitlab-runner/builds/cQMsr2pj/0/lico/lico/core/apps/cloudscheduling/.tox/fmt/lib/python3.9/site-packages/pyproject_fmt/__main__.py", line 71, in <listcomp>
    results = [_handle_one(config) for config in configs]
  File "/home/gitlab-runner/builds/cQMsr2pj/0/lico/lico/core/apps/cloudscheduling/.tox/fmt/lib/python3.9/site-packages/pyproject_fmt/__main__.py", line 38, in _handle_one
    formatted = format_toml(config.toml, config.settings)
pyo3_runtime.PanicException: called `Result::unwrap()` on an `Err` value: Pep508Error { message: String("The ~= operator requires at least two segments in the release version"), start: 25, len: 3, input: "azure-mgmt-costmanagement~=3" }

Report error when I config "azure-mgmt-costmanagement~=3.0.0" in pyproject.toml.

dependencies = [
  "azure-core~=1.24.2",
  "azure-identity~=1.10.0",
  "azure-mgmt-compute~=27.2.0",
  "azure-mgmt-costmanagement~=3.0.0",
  "azure-mgmt-network~=20.0.0",
  "azure-mgmt-resource~=21.1.0",
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions