Skip to content

Commit 38fb1b7

Browse files
committed
Don't force all special methods to be shown
1 parent 1a62372 commit 38fb1b7

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ classifiers = [
3434
"Topic :: Utilities",
3535
]
3636
requires-python = ">=3.9"
37-
dependencies = ["sphinx"]
37+
dependencies = ["sphinx>=2.0"]
3838
dynamic = ["version"]
3939

4040
[project.urls]

sphinxcontrib/prettyspecialmethods.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,7 @@ def apply(self):
215215
parameters_node.replace_self(())
216216

217217

218-
def show_special_methods(app, what, name, obj, skip, options):
219-
if what == "class" and name in SPECIAL_METHODS and getattr(obj, "__doc__", None):
220-
return False
221-
222-
223218
def setup(app: Sphinx) -> dict[str, Any]:
224219
app.add_transform(PrettifySpecialMethods)
225220
app.setup_extension("sphinx.ext.autodoc")
226-
app.connect("autodoc-skip-member", show_special_methods)
227221
return {"version": __version__, "parallel_read_safe": True}

0 commit comments

Comments
 (0)