From 35602139baeecb74a2e7705c015165c6aff0fee1 Mon Sep 17 00:00:00 2001 From: Paul Natsuo Kishimoto Date: Tue, 21 Nov 2023 11:09:57 +0100 Subject: [PATCH] Set Sphinx option nitpicky=True --- doc/conf.py | 8 ++------ ixmp/core/scenario.py | 4 ++-- ixmp/model/base.py | 2 +- ixmp/report/util.py | 2 +- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 89e2496ca..0c34efdfb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -39,12 +39,8 @@ # html_extra_path. exclude_patterns = ["_build", "README.rst", "Thumbs.db", ".DS_Store"] -nitpick_ignore_regex = { - # These occur because there is no .. py:module:: directive for the *top-level* - # module or package in the respective documentation and inventories. - # TODO Remove once the respective docs are fixed - ("py:mod", "message_ix"), -} +# Warn about *all* references where the target cannot be found +nitpicky = True # A string of reStructuredText that will be included at the beginning of every source # file that is read. diff --git a/ixmp/core/scenario.py b/ixmp/core/scenario.py index cd778ceeb..dc539dea8 100644 --- a/ixmp/core/scenario.py +++ b/ixmp/core/scenario.py @@ -353,7 +353,7 @@ def items( If given, only iterate over items where one of the item dimensions is `indexed_by` the set of this name. par_data : bool, optional - If :any:`True` (the default) and `type` is :data:`.ItemType.PAR`, also + If :any:`True` (the default) and `type` is :attr:`.ItemType.PAR`, also iterate over data for each parameter. Yields @@ -454,7 +454,7 @@ def init_item( Parameters ---------- - item_type : ItemType + item_type : .ItemType The type of the item. name : str Name of the item. diff --git a/ixmp/model/base.py b/ixmp/model/base.py index 2f7587693..5332fbfd2 100644 --- a/ixmp/model/base.py +++ b/ixmp/model/base.py @@ -13,7 +13,7 @@ class ModelError(Exception): - """Error in model code, e.g. :meth:`.Model.run`.""" + """Error in model code—that is, :meth:`.Model.run` or other code called by it.""" class Model(ABC): diff --git a/ixmp/report/util.py b/ixmp/report/util.py index 188956975..3e718cc80 100644 --- a/ixmp/report/util.py +++ b/ixmp/report/util.py @@ -12,7 +12,7 @@ def dims_for_qty(data): If *data* is a :class:`pandas.DataFrame`, its columns are processed; otherwise it must be a list. - :data:`RENAME_DIMS` is used to rename dimensions. + :data:`.RENAME_DIMS` is used to rename dimensions. """ if isinstance(data, pd.DataFrame): # List of the dimensions