Skip to content

Commit 490d437

Browse files
committed
Fix pyplot.set_loglevel not appearing in docs.
As the comment says, it's in that file for documentation purposes, but `functools.wraps` copies `__module__`, so it never appears in `pyplot` docs.
1 parent 6273537 commit 490d437

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

doc/missing-references.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,9 +1270,6 @@
12701270
"print_xyz": [
12711271
"lib/matplotlib/backends/backend_template.py:docstring of matplotlib.backends.backend_template:22"
12721272
],
1273-
"pyplot.set_loglevel": [
1274-
"doc/users/prev_whats_new/whats_new_3.1.0.rst:374"
1275-
],
12761273
"rrulewrapper": [
12771274
"lib/matplotlib/dates.py:docstring of matplotlib.dates:143"
12781275
],
@@ -1339,4 +1336,4 @@
13391336
"lib/mpl_toolkits/mplot3d/axes3d.py:docstring of mpl_toolkits.mplot3d.axes3d.Axes3D.get_ylim3d:24"
13401337
]
13411338
}
1342-
}
1339+
}

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def uninstall_repl_displayhook():
186186
draw_all = _pylab_helpers.Gcf.draw_all
187187

188188

189-
@functools.wraps(matplotlib.set_loglevel)
189+
@_copy_docstring_and_deprecators(matplotlib.set_loglevel)
190190
def set_loglevel(*args, **kwargs): # Ensure this appears in the pyplot docs.
191191
return matplotlib.set_loglevel(*args, **kwargs)
192192

0 commit comments

Comments
 (0)