Skip to content

uv python pin 3.12 making .python-version with trailing whitespace #7135

@jamesbraza

Description

@jamesbraza

With uv==0.4.6, running uv python pin 3.12, the made .python-version file does not have trailing whitespace.

This is a little suboptimal because:

  • GitHub will show the "missing trailing whitespace" red icon in the diff
  • If using https://github.com/pre-commit/pre-commit-hooks's trailing-whitespace, it will give a nonzero return code and autofix the .python-version file to have trailing whitespace

Can we have uv python pin either:

  • By default create the .python-version file with trailing whitespace
  • Add a configuration/CLI flag --trailing-whitespace for uv python pin to add the trailing whitespace

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomershelp wantedContribution especially encouraged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions