Fix redundant docstrings and unpin sphinx
The latest version of Sphinx (documentation generation utility) was giving a warning (which we were configured to treat as an error) about there being multiple docstring definitions for the same class. This had never been flagged before.
This commit is contained in:
@@ -225,7 +225,7 @@ setup(
|
||||
"pydocstyle",
|
||||
"pylint",
|
||||
"pytest",
|
||||
"sphinx==2.4.4", # pinned because of https://github.com/sphinx-doc/sphinx/issues/7429
|
||||
"sphinx",
|
||||
"sphinx-autodoc-typehints",
|
||||
"tox",
|
||||
"twine",
|
||||
|
||||
@@ -54,3 +54,39 @@ htmlhelp_basename = "contract_wrapperspydoc"
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {"https://docs.python.org/": None}
|
||||
|
||||
|
||||
def annotate_gend_tuple_docstring( # pylint: disable=too-many-arguments
|
||||
app, # pylint: disable=unused-argument
|
||||
what, # pylint: disable=unused-argument
|
||||
name, # pylint: disable=unused-argument
|
||||
obj, # pylint: disable=unused-argument
|
||||
options, # pylint: disable=unused-argument
|
||||
lines,
|
||||
):
|
||||
"""Annotate docstrings of generated tuples."""
|
||||
docstring_extensions = {
|
||||
"LibOrderOrder": [
|
||||
"This is the generated class representing `the Order struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#order>`_."
|
||||
],
|
||||
"LibFillResultsFillResults": [
|
||||
"This is the generated class representing `the FillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#fillresults>`_."
|
||||
],
|
||||
"LibFillResultsMatchedFillResults": [
|
||||
"This is the generated class representing `the MatchedFillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#matchedfillresults>`_."
|
||||
],
|
||||
"LibOrderOrderInfo": [
|
||||
"This is the generated class representing `the OrderInfo struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#orderinfo>`_."
|
||||
],
|
||||
"LibZeroExTransactionZeroExTransaction": [
|
||||
"This is the generated class representing `the ZeroExTransaction struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#zeroextransaction>`_."
|
||||
],
|
||||
}
|
||||
unqualified_name = name.split(".")[-1]
|
||||
if unqualified_name in docstring_extensions:
|
||||
lines.extend(docstring_extensions[unqualified_name])
|
||||
|
||||
|
||||
def setup(app):
|
||||
"""Install callbacks."""
|
||||
app.connect("autodoc-process-docstring", annotate_gend_tuple_docstring)
|
||||
|
||||
@@ -198,29 +198,6 @@ zero_ex.contract_wrappers.exchange.types
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.types.ZeroExTransaction
|
||||
|
||||
zero_ex.contract_wrappers.exchange: Generated Tuples
|
||||
====================================================
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.LibOrderOrder
|
||||
|
||||
This is the generated class representing `the Order struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#order>`_.
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.LibFillResultsFillResults
|
||||
|
||||
This is the generated class representing `the FillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#fillresults>`_.
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.LibFillResultsMatchedFillResults
|
||||
|
||||
This is the generated class representing `the MatchedFillResults struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#matchedfillresults>`_.
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.LibOrderOrderInfo
|
||||
|
||||
This is the generated class representing `the OrderInfo struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#orderinfo>`_.
|
||||
|
||||
.. autoclass:: zero_ex.contract_wrappers.exchange.LibZeroExTransactionZeroExTransaction
|
||||
|
||||
This is the generated class representing `the ZeroExTransaction struct <https://github.com/0xProject/0x-protocol-specification/blob/master/v3/v3-specification.md#zeroextransaction>`_.
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
|
||||
@@ -16,16 +16,6 @@ zero_ex.order_utils.asset_data_utils
|
||||
.. automodule:: zero_ex.order_utils.asset_data_utils
|
||||
:members:
|
||||
|
||||
.. autoclass:: zero_ex.order_utils.asset_data_utils.ERC20AssetData
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
.. autoclass:: zero_ex.order_utils.asset_data_utils.ERC721AssetData
|
||||
:members:
|
||||
:undoc-members:
|
||||
:show-inheritance:
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
|
||||
Reference in New Issue
Block a user