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

Improve command-line descriptions (#1374)

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