Commit 0a5b448d by Géry Ogam Committed by Steph Samson

Improve command-line descriptions (#1374)

parent 9e9f4455
......@@ -4,20 +4,20 @@ from .env_command import EnvCommand
class AddCommand(EnvCommand, InitCommand):
"""
Adds a new dependency to <comment>pyproject.toml</>.
Adds a new dependency to the <comment>pyproject.toml</> file.
add
{ name* : Packages to add. }
{ --D|dev : Add package as development dependency. }
{ name* : The packages to add. }
{ --D|dev : Add as a development dependency. }
{ --git= : The url of the Git repository. }
{ --path= : The path to a dependency. }
{ --E|extras=* : Extras to activate for the dependency. }
{ --optional : Add as an optional dependency. }
{ --python= : Python version( for which the dependencies must be installed. }
{ --platform= : Platforms for which the dependencies must be installed. }
{ --python= : Python version for which the dependency must be installed. }
{ --platform= : Platforms for which the dependency must be installed. }
{ --allow-prereleases : Accept prereleases. }
{ --dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). }
{ --dry-run : Output the operations but do not execute anything
(implicitly enables --verbose). }
"""
help = """The add command adds required packages to your <comment>pyproject.toml</> and installs them.
......
......@@ -6,7 +6,7 @@ class BuildCommand(EnvCommand):
Builds a package, as a tarball and a wheel by default.
build
{ --f|format= : Limit the format to either wheel or sdist. }
{ --f|format= : Limit the format to either sdist or wheel. }
"""
def handle(self):
......
......@@ -5,11 +5,11 @@ from ..command import Command
class CacheClearCommand(Command):
"""
Clears poetry's cache.
Clears Poetry's cache.
cache:clear
{ cache : The name of the cache to clear. }
{ --all : Clear all entries in cache. }
{ --all : Clear all entries in the cache. }
"""
def handle(self):
......
......@@ -15,13 +15,13 @@ AUTH_TEMPLATE = """[http-basic]
class ConfigCommand(Command):
"""
Sets/Gets config options.
Manages configuration settings.
config
{ key : Setting key. }
{ value?* : Setting value. }
{ --list : List configuration settings }
{ --unset : Unset configuration setting }
{ --list : List configuration settings. }
{ --unset : Unset configuration setting. }
"""
help = """This command allows you to edit the poetry config settings and repositories.
......
......@@ -10,10 +10,10 @@ class DebugResolveCommand(Command):
Debugs dependency resolution.
debug:resolve
{ package?* : packages to resolve. }
{ package?* : The packages to resolve. }
{ --E|extras=* : Extras to activate for the dependency. }
{ --python= : Python version(s) to use for resolution. }
{ --tree : Displays the dependency tree. }
{ --tree : Display the dependency tree. }
{ --install : Show what would be installed for the current system. }
"""
......
......@@ -15,14 +15,16 @@ class InitCommand(Command):
Creates a basic <comment>pyproject.toml</> file in the current directory.
init
{--name= : Name of the package}
{--description= : Description of the package}
{--author= : Author name of the package}
{--dependency=* : Package to require with an optional version constraint,
e.g. requests:^2.10.0 or requests=2.11.1}
{--dev-dependency=* : Package to require for development with an optional version constraint,
e.g. requests:^2.10.0 or requests=2.11.1}
{--l|license= : License of the package}
{ --name= : Name of the package. }
{ --description= : Description of the package. }
{ --author= : Author name of the package. }
{ --dependency=* : Dependency to require,
with an optional version constraint,
(e.g., requests:^2.10.0 or requests=2.11.1). }
{ --dev-dependency=* : Development dependency to require,
with an optional version constraint,
(e.g., requests:^2.10.0 or requests=2.11.1). }
{ --l|license= : License of the package. }
"""
help = """\
......
......@@ -8,11 +8,11 @@ class InstallCommand(EnvCommand):
Installs the project dependencies.
install
{ --no-dev : Do not install dev dependencies. }
{ --dry-run : Outputs the operations but will not execute anything
{ --no-dev : Do not install the development dependencies. }
{ --dry-run : Output the operations but do not execute anything
(implicitly enables --verbose). }
{ --E|extras=* : Extra sets of dependencies to install. }
{ --develop=* : Install given packages in development mode. }
{ --E|extras=* : Extra sets of project dependencies to install. }
{ --develop=* : Install the given project dependencies in development mode. }
"""
help = """The <info>install</info> command reads the <comment>poetry.lock</> file from
......
......@@ -3,7 +3,7 @@ from .command import Command
class NewCommand(Command):
"""
Creates a new Python project at <path>
Creates a new Python project at <path>.
new
{ path : The path to create the project at. }
......
......@@ -6,10 +6,10 @@ class RemoveCommand(EnvCommand):
Removes a package from the project dependencies.
remove
{ packages* : Packages that should be removed. }
{--D|dev : Removes a package from the development dependencies. }
{--dry-run : Outputs the operations but will not execute anything
(implicitly enables --verbose). }
{ packages* : The packages to remove. }
{ --D|dev : Remove a package from the development dependencies. }
{ --dry-run : Output the operations but do not execute anything
(implicitly enables --verbose). }
"""
help = """The <info>remove</info> command removes a package from the current
......
......@@ -3,10 +3,10 @@ from .env_command import EnvCommand
class ScriptCommand(EnvCommand):
"""
Executes a script defined in <comment>pyproject.toml</comment>. (<error>Deprecated</error>)
Executes a script defined in the <comment>pyproject.toml</comment> file. (<error>Deprecated</error>)
script
{ script-name : The name of the script to execute }
{ script-name : The name of the script to execute. }
{ args?* : The command and arguments/options to pass to the script. }
"""
......
......@@ -7,7 +7,7 @@ class SearchCommand(Command):
search
{ tokens* : The tokens to search for. }
{ --N|only-name : Search only in name. }
{ --N|only-name : Search only by name. }
"""
def handle(self):
......
......@@ -20,7 +20,7 @@ from ..command import Command
class SelfUpdateCommand(Command):
"""
Updates poetry to the latest version.
Updates Poetry to the latest version.
self:update
{ version? : The version to update to. }
......
......@@ -9,13 +9,14 @@ class ShowCommand(EnvCommand):
Shows information about packages.
show
{ package? : Package to inspect. }
{ --no-dev : Do not list the dev dependencies. }
{ --t|tree : List the dependencies as a tree. }
{ package? : The package to inspect. }
{ --no-dev : Do not list the development dependencies. }
{ --t|tree : List the project dependencies as a tree. }
{ --l|latest : Show the latest version. }
{ --o|outdated : Show the latest version
but only for packages that are outdated. }
{ --a|all : Show all packages (even those not compatible with current system). }
{ --a|all : Show all packages
(even those not compatible with the current system). }
"""
help = """The show command displays detailed information about a package, or
......
......@@ -3,14 +3,14 @@ from .env_command import EnvCommand
class UpdateCommand(EnvCommand):
"""
Updates dependencies as according to the <comment>pyproject.toml</> file.
Updates the project dependencies according to the <comment>pyproject.toml</> file.
update
{ packages?* : The packages to update. }
{ --no-dev : Do not install dev dependencies. }
{ --dry-run : Outputs the operations but will not execute anything
{ --no-dev : Do not install the development dependencies. }
{ --dry-run : Output the operations but do not execute anything
(implicitly enables --verbose). }
{ --lock : Do not perform install (only update the lockfile). }
{ --lock : Do not perform install (only update the lock file). }
"""
_loggers = ["poetry.repositories.pypi_repository"]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment