Keep specification format of `pyproject.toml` unchanged in automated dependabot pull requests

87 views Asked by At

Consider a python package with package specifications in pyproject.toml. All the required and optional dependencies are specified in the format:

...
    "package_name<upper_bound,>=lower_bound",
...

This is according to pyproject-fmt, which is also part of the configured pre-commit hooks.

The Github repository is configured with Dependabot, and while it detects a new release of package_name, it is trying to make the above line change to the following:

...
    "package_name>=lower_bound,<new_upper_bound",
...

This is causing CI failure which is running pre-commit and the formatter tool tries to change it back in the consistent format it is using.

My question is whether there is a way to configure Dependabot such that it modifies the upper bound in place without rewriting the line, something like this:

...
    "package_name<new_upper_bound,>=lower_bound",
...
0

There are 0 answers