diff --git a/poetry/console/commands/add.py b/poetry/console/commands/add.py index 275fc44f5f1..378d7a2f871 100644 --- a/poetry/console/commands/add.py +++ b/poetry/console/commands/add.py @@ -40,11 +40,18 @@ class AddCommand(EnvCommand, InitCommand): "Output the operations but do not execute anything (implicitly enables --verbose).", ), ] - - help = """The add command adds required packages to your pyproject.toml and installs them. - -If you do not specify a version constraint, poetry will choose a suitable one based on the available package versions. -""" + help = ( + "The add command adds required packages to your pyproject.toml and installs them.\n\n" + "If you do not specify a version constraint, poetry will choose a suitable one based on the available package versions.\n\n" + "You can specify a package in the following forms:\n" + " - A single name (requests)\n" + " - A name and a constraint (requests@^2.23.0)\n" + " - A git url (git+https://github.com/python-poetry/poetry.git)\n" + " - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)\n" + " - A file path (../my-package/my-package.whl)\n" + " - A directory (../my-package/)\n" + " - A url (https://example.com/packages/my-package-0.1.0.tar.gz)\n" + ) loggers = ["poetry.repositories.pypi_repository"] diff --git a/poetry/console/commands/init.py b/poetry/console/commands/init.py index b74d191fa5c..c85f441b8aa 100644 --- a/poetry/console/commands/init.py +++ b/poetry/console/commands/init.py @@ -146,7 +146,7 @@ def handle(self): help_message = ( "You can specify a package in the following forms:\n" " - A single name (requests)\n" - " - A name and a constraint (requests ^2.23.0)\n" + " - A name and a constraint (requests@^2.23.0)\n" " - A git url (git+https://github.com/python-poetry/poetry.git)\n" " - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)\n" " - A file path (../my-package/my-package.whl)\n"