Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f046b4

Browse filesBrowse files
authored
Merge pull request #13973 from ksunden/fix_OO
BUG: Ensure docstrings are not accessed with -OO
2 parents df2a26d + efd44e5 commit 2f046b4
Copy full SHA for 2f046b4

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎lib/matplotlib/scale.py

Copy file name to clipboardExpand all lines: lib/matplotlib/scale.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,8 +741,10 @@ def scale_factory(scale, axis, **kwargs):
741741
if scale not in _scale_mapping:
742742
raise ValueError("Unknown scale type '%s'" % scale)
743743
return _scale_mapping[scale](axis, **kwargs)
744-
scale_factory.__doc__ = scale_factory.__doc__ % {
745-
"names": ", ".join(get_scale_names())}
744+
745+
if scale_factory.__doc__:
746+
scale_factory.__doc__ = scale_factory.__doc__ % {
747+
"names": ", ".join(get_scale_names())}
746748

747749

748750
def register_scale(scale_class):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.