Merge pull request #2544 from 0xProject/fix/pyfail-dupe-docstrings

Python: unpin Sphinx dependency, clean up warnings
This commit is contained in:
F. Eugene Aumson 2020-04-29 13:53:18 -04:00 committed by GitHub
commit 19b28a58d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 37 additions and 44 deletions

View File

@ -225,8 +225,7 @@ setup(
"pydocstyle",
"pylint",
"pytest",
"sphinx==2.4.4", # pinned because of https://github.com/sphinx-doc/sphinx/issues/7429
"sphinx-autodoc-typehints",
"sphinx",
"tox",
"twine",
]

View File

@ -23,7 +23,6 @@ extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
templates_path = ["doc_templates"]
@ -54,3 +53,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)

View File

@ -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
==================

View File

@ -179,7 +179,6 @@ setup(
"pylint",
"pytest",
"sphinx",
"sphinx-autodoc-typehints",
"tox",
"twine",
]

View File

@ -22,7 +22,6 @@ extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
templates_path = ["doc_templates"]

View File

@ -180,7 +180,6 @@ setup(
"pylint",
"pytest",
"sphinx",
"sphinx-autodoc-typehints",
"tox",
"twine",
]

View File

@ -22,7 +22,6 @@ extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
templates_path = ["doc_templates"]

View File

@ -200,7 +200,6 @@ setup(
"pylint",
"pytest",
"sphinx",
"sphinx-autodoc-typehints",
"tox",
"twine",
]

View File

@ -22,7 +22,6 @@ extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
templates_path = ["doc_templates"]

View File

@ -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
==================

View File

@ -227,7 +227,6 @@ setup(
"pylint",
"pytest",
"sphinx",
"sphinx-autodoc-typehints",
]
},
command_options={

View File

@ -22,7 +22,6 @@ extensions = [
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_autodoc_typehints",
]
templates_path = ["doc_templates"]