Skip to content

Commit

Permalink
docs(trings): fix <blockquote>s happening when they shouldn't
Browse files Browse the repository at this point in the history
One left in sopel.cli.config, which is better fixed by a small patch to
sphinxcontrib.autoprogram if the patch is accepted.
(See sphinx-contrib/autoprogram#21)
  • Loading branch information
dgw committed Nov 15, 2020
1 parent 1da6aee commit 5694650
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
8 changes: 4 additions & 4 deletions docs/source/cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ overrides the value from Sopel's config file.

The variable name Sopel looks for is structured as follows:

* ``SOPEL_`` prefix (to prevent collisions with other programs)
* The section name in UPPERCASE, e.g. ``CORE`` or ``PLUGIN_NAME``
* ``_`` as separator
* The setting name in UPPERCASE, e.g. ``NICK`` or ``API_KEY``
* ``SOPEL_`` prefix (to prevent collisions with other programs)
* The section name in UPPERCASE, e.g. ``CORE`` or ``PLUGIN_NAME``
* ``_`` as separator
* The setting name in UPPERCASE, e.g. ``NICK`` or ``API_KEY``

For example, take this stripped-down config file:

Expand Down
3 changes: 3 additions & 0 deletions sopel/cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ def build_parser():
list_parser = subparsers.add_parser(
'list',
help="List available configurations from Sopel's config directory",
# TODO: if https://github.com/sphinx-contrib/autoprogram/pull/21 is
# accepted, we'll need to require a version of autoprogram including
# the fix. (If not... we need an alternative solution locally.)
description="""
List available configurations from Sopel's config directory
with the extension "{ext}". Use option ``--config-dir`` to use a
Expand Down
24 changes: 12 additions & 12 deletions sopel/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ def add_section(self, name):
The section's ``name`` SHOULD follow *snake_case* naming rules:
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
Deviations from *snake_case* can break the following operations:
* :ref:`accessing the section <sopel.config>` from Python code using
the :class:`~.Config` object's attributes
* :ref:`overriding the section's values <Overriding individual
settings>` using environment variables
* :ref:`accessing the section <sopel.config>` from Python code
using the :class:`~.Config` object's attributes
* :ref:`overriding the section's values <Overriding individual
settings>` using environment variables
"""
try:
Expand Down Expand Up @@ -235,15 +235,15 @@ def define_section(self, name, cls_, validate=True):
The section's ``name`` SHOULD follow *snake_case* naming rules:
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
Deviations from *snake_case* can break the following operations:
* :ref:`accessing the section <sopel.config>` from Python code using
the :class:`~.Config` object's attributes
* :ref:`overriding the section's values <Overriding individual
settings>` using environment variables
* :ref:`accessing the section <sopel.config>` from Python code
using the :class:`~.Config` object's attributes
* :ref:`overriding the section's values <Overriding individual
settings>` using environment variables
"""
if not issubclass(cls_, types.StaticSection):
Expand Down
12 changes: 6 additions & 6 deletions sopel/config/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ class BaseValidated(object):
Setting names SHOULD follow *snake_case* naming rules:
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
* use only lowercase letters, digits, and underscore (``_``)
* SHOULD NOT start with a digit
Deviations from *snake_case* can break the following operations:
* :ref:`accessing the setting <sopel.config>` from Python code using
the :class:`~.Config` object's attributes
* :ref:`overriding the setting's value <Overriding individual
settings>` using environment variables
* :ref:`accessing the setting <sopel.config>` from Python code using
the :class:`~.Config` object's attributes
* :ref:`overriding the setting's value <Overriding individual
settings>` using environment variables
"""
def __init__(self, name, default=None, is_secret=False):
Expand Down
4 changes: 2 additions & 2 deletions sopel/tools/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def trim_url(url):
This function removes trailing punctuation that looks like it was not
intended to be part of the URL:
* trailing sentence- or clause-ending marks like ``.``, ``;``, etc.
* unmatched trailing brackets/braces like ``}``, ``)``, etc.
* trailing sentence- or clause-ending marks like ``.``, ``;``, etc.
* unmatched trailing brackets/braces like ``}``, ``)``, etc.
It is intended for use with the output of :py:func:`~.search_urls`, which
may include trailing punctuation when used on input from chat.
Expand Down

0 comments on commit 5694650

Please sign in to comment.