Skip to content

Should dependency group names be normalized with underscores converted to hyphens? #8591

@drmikehenry

Description

@drmikehenry

Should dependency group names be normalized with underscores converted to hyphens?

Example:

uv init example
cd example
uv add --group some_group ruff
grep 'some.group' pyproject.toml

with output:

some-group = [

I'm looking into porting a project using Poetry and Nox, where Nox session names and Poetry group names use underscores. These names are exposed in noxfile.py and on the nox command line. It's looking like these names might need to switch to using hyphens in order to use uv dependency groups. Is this expected?

I'm running uv version 0.4.27 on Ubuntu 24.04.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionUndecided if this should be done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions