Skip to content

feat: allow multiple authors in poetry init#10956

Draft
YNan-varamor wants to merge 4 commits into
python-poetry:mainfrom
YNan-varamor:feat/8864-multiple-init-authors
Draft

feat: allow multiple authors in poetry init#10956
YNan-varamor wants to merge 4 commits into
python-poetry:mainfrom
YNan-varamor:feat/8864-multiple-init-authors

Conversation

@YNan-varamor

Copy link
Copy Markdown

Summary

Allows poetry init --author to be passed multiple times, e.g.:

poetry init --author "Alice Example <alice@example.com>" --author "Bob Example <bob@example.com>"

Why

Fixes #8864. The issue asks for a non-interactive way to provide multiple authors. A maintainer suggested supporting repeated --author flags, which keeps the CLI usable in scripts and avoids interactive prompts.

Changes

  • Marks the init command's --author option as repeatable
  • Validates every provided author with the existing author validator
  • Writes multiple authors to [project].authors while preserving the existing single-author interactive/default behavior
  • Adds a regression test for repeated --author

Validation

  • python -m pytest tests/console/commands/test_init.py::test_init_non_interactive_with_multiple_authors tests/console/commands/test_init.py::test_init_non_interactive_existing_pyproject_add_dependency -q -o addopts=''
  • git diff --check

AI assistance disclosure

This PR was prepared with assistance from OpenAI Codex. The change was reviewed locally and validated with focused tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

poetry init --author doesn't seem to allow multiple authors on Windows

1 participant