Merge pull request #2544 from 0xProject/fix/pyfail-dupe-docstrings
Python: unpin Sphinx dependency, clean up warnings
This commit is contained in:
commit
19b28a58d6
@ -225,8 +225,7 @@ setup(
|
|||||||
"pydocstyle",
|
"pydocstyle",
|
||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"sphinx==2.4.4", # pinned because of https://github.com/sphinx-doc/sphinx/issues/7429
|
"sphinx",
|
||||||
"sphinx-autodoc-typehints",
|
|
||||||
"tox",
|
"tox",
|
||||||
"twine",
|
"twine",
|
||||||
]
|
]
|
||||||
|
@ -23,7 +23,6 @@ extensions = [
|
|||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_autodoc_typehints",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ["doc_templates"]
|
templates_path = ["doc_templates"]
|
||||||
@ -54,3 +53,39 @@ htmlhelp_basename = "contract_wrapperspydoc"
|
|||||||
|
|
||||||
# Example configuration for intersphinx: refer to the Python standard library.
|
# Example configuration for intersphinx: refer to the Python standard library.
|
||||||
intersphinx_mapping = {"https://docs.python.org/": None}
|
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
|
.. 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
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@ setup(
|
|||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"sphinx",
|
"sphinx",
|
||||||
"sphinx-autodoc-typehints",
|
|
||||||
"tox",
|
"tox",
|
||||||
"twine",
|
"twine",
|
||||||
]
|
]
|
||||||
|
@ -22,7 +22,6 @@ extensions = [
|
|||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_autodoc_typehints",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ["doc_templates"]
|
templates_path = ["doc_templates"]
|
||||||
|
@ -180,7 +180,6 @@ setup(
|
|||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"sphinx",
|
"sphinx",
|
||||||
"sphinx-autodoc-typehints",
|
|
||||||
"tox",
|
"tox",
|
||||||
"twine",
|
"twine",
|
||||||
]
|
]
|
||||||
|
@ -22,7 +22,6 @@ extensions = [
|
|||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_autodoc_typehints",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ["doc_templates"]
|
templates_path = ["doc_templates"]
|
||||||
|
@ -200,7 +200,6 @@ setup(
|
|||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"sphinx",
|
"sphinx",
|
||||||
"sphinx-autodoc-typehints",
|
|
||||||
"tox",
|
"tox",
|
||||||
"twine",
|
"twine",
|
||||||
]
|
]
|
||||||
|
@ -22,7 +22,6 @@ extensions = [
|
|||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_autodoc_typehints",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ["doc_templates"]
|
templates_path = ["doc_templates"]
|
||||||
|
@ -16,16 +16,6 @@ zero_ex.order_utils.asset_data_utils
|
|||||||
.. automodule:: zero_ex.order_utils.asset_data_utils
|
.. automodule:: zero_ex.order_utils.asset_data_utils
|
||||||
:members:
|
: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
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -227,7 +227,6 @@ setup(
|
|||||||
"pylint",
|
"pylint",
|
||||||
"pytest",
|
"pytest",
|
||||||
"sphinx",
|
"sphinx",
|
||||||
"sphinx-autodoc-typehints",
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
command_options={
|
command_options={
|
||||||
|
@ -22,7 +22,6 @@ extensions = [
|
|||||||
"sphinx.ext.intersphinx",
|
"sphinx.ext.intersphinx",
|
||||||
"sphinx.ext.coverage",
|
"sphinx.ext.coverage",
|
||||||
"sphinx.ext.viewcode",
|
"sphinx.ext.viewcode",
|
||||||
"sphinx_autodoc_typehints",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
templates_path = ["doc_templates"]
|
templates_path = ["doc_templates"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user