Skip to content

Commit

Permalink
Replace some strings by multi-line strings
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 7, 2022
1 parent 1df48c9 commit 8fa7926
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 27 deletions.
36 changes: 20 additions & 16 deletions src/poetry/console/commands/add.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,26 @@ class AddCommand(InstallerCommand, InitCommand):
),
option("lock", None, "Do not perform operations (only update the lockfile)."),
]
help = (
"The add command adds required packages to your <comment>pyproject.toml</> and"
" installs them.\n\nIf you do not specify a version constraint, poetry will"
" choose a suitable one based on the available package versions.\n\nYou can"
" specify a package in the following forms:\n - A single name"
" (<b>requests</b>)\n - A name and a constraint (<b>requests@^2.23.0</b>)\n -"
" A git url (<b>git+https://github.com/python-poetry/poetry.git</b>)\n - A git"
" url with a revision"
" (<b>git+https://github.com/python-poetry/poetry.git#develop</b>)\n - A git"
" SSH url (<b>git+ssh://github.com/python-poetry/poetry.git</b>)\n - A git SSH"
" url with a revision"
" (<b>git+ssh://github.com/python-poetry/poetry.git#develop</b>)\n - A file"
" path (<b>../my-package/my-package.whl</b>)\n - A directory"
" (<b>../my-package/</b>)\n - A url"
" (<b>https://example.com/packages/my-package-0.1.0.tar.gz</b>)\n"
)
help = """\
The add command adds required packages to your <comment>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.
You can specify a package in the following forms:
- A single name (<b>requests</b>)
- A name and a constraint (<b>requests@^2.23.0</b>)
- A git url (<b>git+https://github.com/python-poetry/poetry.git</b>)
- A git url with a revision\
(<b>git+https://github.com/python-poetry/poetry.git#develop</b>)
- A git SSH url (<b>git+ssh://github.com/python-poetry/poetry.git</b>)
- A git SSH url with a revision\
(<b>git+ssh://github.com/python-poetry/poetry.git#develop</b>)
- A file path (<b>../my-package/my-package.whl</b>)
- A directory (<b>../my-package/</b>)
- A url (<b>https://example.com/packages/my-package-0.1.0.tar.gz</b>)
"""

loggers = ["poetry.repositories.pypi_repository", "poetry.inspection.info"]

Expand Down
23 changes: 12 additions & 11 deletions src/poetry/console/commands/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,18 @@ def handle(self) -> int:
)

question = "Would you like to define your main dependencies interactively?"
help_message = (
"You can specify a package in the following forms:\n - A single name"
" (<b>requests</b>)\n - A name and a constraint"
" (<b>requests@^2.23.0</b>)\n - A git url"
" (<b>git+https://github.com/python-poetry/poetry.git</b>)\n - A git url"
" with a revision"
" (<b>git+https://github.com/python-poetry/poetry.git#develop</b>)\n - A"
" file path (<b>../my-package/my-package.whl</b>)\n - A directory"
" (<b>../my-package/</b>)\n - A url"
" (<b>https://example.com/packages/my-package-0.1.0.tar.gz</b>)\n"
)
help_message = """\
You can specify a package in the following forms:
- A single name (<b>requests</b>)
- A name and a constraint (<b>requests@^2.23.0</b>)
- A git url (<b>git+https://github.com/python-poetry/poetry.git</b>)
- A git url with a revision\
(<b>git+https://github.com/python-poetry/poetry.git#develop</b>)
- A file path (<b>../my-package/my-package.whl</b>)
- A directory (<b>../my-package/</b>)
- A url (<b>https://example.com/packages/my-package-0.1.0.tar.gz</b>)
"""

help_displayed = False
if self.confirm(question, True):
if self.io.is_interactive():
Expand Down

0 comments on commit 8fa7926

Please sign in to comment.