Skip to content

Commit

Permalink
extension: remove cautodoc_root and cautodoc_clang config options
Browse files Browse the repository at this point in the history
The cautodoc_root and cautodoc_clang config options have been deprecated
in favour of hawkmoth_root and hawkmoth_clang since Hawkmoth
v0.13.0. Remove them.
  • Loading branch information
jnikula committed Sep 7, 2024
1 parent f7b5dff commit befd014
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 35 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Removed

* ``hawkmoth --compat={none,javadoc-basic,javadoc-liberal,kernel-doc}`` option
from CLI
* ``cautodoc_root`` configuration option in favour of ``hawkmoth_root``
* ``cautodoc_clang`` configuration option in favour of ``hawkmoth_clang``

Hawkmoth `0.18.0`_
------------------
Expand Down
21 changes: 0 additions & 21 deletions doc/extension.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,24 +105,3 @@ See also additional configuration options in the :ref:`built-in extensions
.. code-block:: python
hawkmoth_source_uri = 'https://example.org/src/{source}#L{line}'
.. py:data:: cautodoc_root
:type: str

Equivalent to :py:data:`hawkmoth_root`.

.. warning::

The ``cautodoc_root`` option has been deprecated in favour of the
:py:data:`hawkmoth_root` option and will be removed in the future.

.. py:data:: cautodoc_clang
:type: str

Equivalent to :py:data:`hawkmoth_clang`.

.. warning::

The ``cautodoc_clang`` option has been deprecated in favour of
the :py:data:`hawkmoth_clang` option and will be removed in the
future.
15 changes: 2 additions & 13 deletions src/hawkmoth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,19 +360,8 @@ def _deprecate(conf, old, new, default=None):
def setup(app):
app.require_sphinx('3.0')

app.add_config_value('cautodoc_root', None, 'env', [str])
app.add_config_value('cautodoc_clang', None, 'env', [list])

app.add_config_value(
'hawkmoth_root',
lambda conf: _deprecate(conf, 'cautodoc_root', 'hawkmoth_root', app.confdir),
'env', [str]
)
app.add_config_value(
'hawkmoth_clang',
lambda conf: _deprecate(conf, 'cautodoc_clang', 'hawkmoth_clang', []),
'env', [list]
)
app.add_config_value('hawkmoth_root', app.confdir, 'env', [str])
app.add_config_value('hawkmoth_clang', [], 'env', [list])

app.add_config_value('hawkmoth_transform_default', None, 'env', [str])

Expand Down
2 changes: 1 addition & 1 deletion src/hawkmoth/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main():
],
help='Process docstring.')
parser.add_argument('--clang', metavar='PARAM', action='append',
help='Argument to pass to Clang. May be specified multiple times. See cautodoc_clang.') # noqa: E501
help='Argument to pass to Clang. May be specified multiple times. See hawkmoth_clang.') # noqa: E501
parser.add_argument('--verbose', dest='verbose', action='store_true',
help='Verbose output.')
parser.add_argument('--version', action='version',
Expand Down

0 comments on commit befd014

Please sign in to comment.