Skip to content
Snippets Groups Projects
Verified Commit b9943d10 authored by Yannick DAYER's avatar Yannick DAYER
Browse files

fix: fixing typos and formatting issues.

parent 6f5b20fa
No related branches found
No related tags found
1 merge request!18Draft: feat: add a list of available entry-points in the CLI help
Pipeline #75377 failed
......@@ -71,7 +71,7 @@ def verbosity_option(
name: Long name of the option. If not set, then use ``verbose`` --
this will also become the name of the contextual parameter for click.
dlft: The default verbosity level to use (defaults to 0).
dflt: The default verbosity level to use (defaults to 0).
**kwargs: Further keyword-arguments to be forwarded to the underlying
:py:func:`click.option`
......@@ -106,12 +106,13 @@ def verbosity_option(
type=click.IntRange(min=0, max=3, clamp=True),
default=dflt,
show_default=True,
help=(
f"Increase the verbosity level from 0 (only error and "
f"critical) messages will be displayed, to 1 (like 0, but adds "
f"warnings), 2 (like 1, but adds info messags), and 3 (like 2, "
f"but also adds debugging messages) by adding the --{name} "
f"option as often as desired (e.g. '-vvv' for debug)."
help=dedent(
f"""Increase the verbosity level from 0 (only error and
critical) messages will be displayed, to 1 (like 0, but adds
warnings), 2 (like 1, but adds info messages), and 3 (like 2,
but also adds debugging messages) by adding the --{name} option
as often as desired (e.g. '-vvv' for debug).
"""
),
callback=callback,
**kwargs,
......@@ -323,12 +324,12 @@ class ResourceOption(click.Option):
1. Using this class (without using :py:class:`ConfigCommand`) AND
(providing ``entry_point_group``).
2. Using this class (with :py:class:`ConfigCommand`) AND (providing
`entry_point_group`).
``entry_point_group``).
3. Using this class (with :py:class:`ConfigCommand`) AND (without providing
`entry_point_group`).
``entry_point_group``).
Using this class without :py:class:`ConfigCommand` and without providing
`entry_point_group` does nothing and is not allowed.
``entry_point_group`` does nothing and is not allowed.
Attributes:
......@@ -424,7 +425,7 @@ class ResourceOption(click.Option):
) -> tuple[typing.Any, ParameterSource]:
"""Retrieves value for parameter from appropriate context.
This method will retrive the value of its own parameter from the
This method will retrieve the value of its own parameter from the
appropriate context, by trying various sources.
......@@ -698,7 +699,7 @@ def config_group(
configurations.
This decorator adds a whole command group to a user predefined function
which is part of the user's CLI. The command group provdes an interface to
which is part of the user's CLI. The command group provides an interface to
list, fully describe or locally copy configuration files distributed with
the package. Commands accept both entry-point or module names to be
provided as input.
......
......@@ -131,7 +131,7 @@ def _resolve_entry_point_or_modules(
entry-point names and module names to a set of file system paths.
Examples of things that can be resolved by this function are:
``["/tmp/config.py", "my-config", "expose.config"]`` (an actualy filesystem
``["/tmp/config.py", "my-config", "expose.config"]`` (an actual filesystem
path, an entry-point described in a ``setup.py`` file, or the name of a
python module.
......@@ -291,7 +291,7 @@ def load(
# remove the keys that might break the loading of the next config file.
ctxt.__dict__.pop("__name__", None)
ctxt.__dict__.pop("__package__", None)
# do not propogate __ variables
# do not propagate __ variables
context = {
k: v for k, v in ctxt.__dict__.items() if not k.startswith("__")
}
......@@ -350,7 +350,7 @@ def resource_keys(
that entry point distribution (``.dist`` attribute) was only added to
Python in version 3.10. We therefore currently only verify if the named
resource does not start with any of the strings provided in
`exclude_package``.
``exclude_package``.
Arguments:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment