Python Poetry - update -dev dependencies only to latest

Viewed 222

How do I get Poetry to update dev dependencies only to latest?

I originally had:

[tool.poetry.dev-dependencies]
pytest = "^4.6"

But I wanted:

[tool.poetry.dev-dependencies]
pytest = "^6.0"

I achieved it by manual editing the pyproject.toml file.

When I ran poetry update it ( brilliantly ) bumped all my normal ( non-dev ) dependencies.

1 Answers

This is the command I wanted:

poetry add pytest@latest --dev
Related