Skip to content

Commit 8a48e77

Browse files
committed
Remove dep on sphinx-toolbox
1 parent 01b085b commit 8a48e77

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

doc/OnlineDocs/ext/pyomo_autosummary_autoenum.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

2121
from sphinx.application import Sphinx
2222
from sphinx.domains import ObjType
23-
from sphinx.domains.python import PyClasslike, PyAttribute, PyXRefRole
23+
from sphinx.domains.python import PyClasslike, PyXRefRole
2424
from sphinx.ext import autodoc, autosummary
2525
from sphinx.ext.autosummary import mangle_signature as _msig
2626
from sphinx.ext.autosummary.generate import generate_autosummary_content as _gac
2727
from sphinx.util.inspect import object_description
28-
from sphinx_toolbox.more_autodoc.typehints import format_annotation
29-
from typing import Type, Any, Dict, List, Tuple, Union
28+
from sphinx.util.typing import restify
29+
from typing import Any, Dict, List, Tuple
3030

3131
_pre_re = re.compile(r'^( = )(.*)')
3232

@@ -129,7 +129,7 @@ def render(self, name, ns):
129129
for _base in mro[: mro.index(enum.Enum)]:
130130
if not isinstance(_base, enum.EnumMeta):
131131
ns['member_type'] = (
132-
f"Member type: {format_annotation(_base)}"
132+
f"Member type: {restify(_base, mode='smart')}"
133133
)
134134
break
135135
return super().render(name, ns)

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ def __ne__(self, other):
219219
'sphinx_rtd_theme>0.5',
220220
'sphinxcontrib-jsmath',
221221
'sphinxcontrib-napoleon',
222-
'sphinx-toolbox', # Used by pyomo_autosummary_autoenum
223222
'numpy', # Needed by autodoc for pynumero
224223
'scipy', # Needed by autodoc for pynumero
225224
],

0 commit comments

Comments
 (0)