Skip to content

Commit

Permalink
Clarify that name and version fields are required in non-package …
Browse files Browse the repository at this point in the history
…mode if `[project]` is used
  • Loading branch information
johnthagen authored and abn committed Jan 14, 2025
1 parent 88b2bab commit 1e1e272
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ menu:
In package mode, the only required fields are `name` and `version`
(either in the `project` section or in the `tool.poetry` section).
Other fields are optional.
In non-package mode, all fields are optional.
In non-package mode, the `name` and `version` fields are required
if using the `project` section.

{{% note %}}
Run `poetry check` to print warnings about deprecated fields.
Expand All @@ -39,7 +40,7 @@ name = "my-package"

### version

The version of the package. **Required in package mode**
The version of the package. **Always required when the `project` section is specified**

This should be a valid [PEP 440](https://peps.python.org/pep-0440/) string.

Expand Down

0 comments on commit 1e1e272

Please sign in to comment.